forked from aniani/vim
patch 8.0.0896: cannot close a terminal window when the job ends
Problem: Cannot automaticlaly close a terminal window when the job ends.
Solution: Add the ++close argument to :term. Add the term_finish option to
term_start(). (Yasuhiro Matsumoto, closes #1950) Also add
++open.
This commit is contained in:
@@ -4419,6 +4419,19 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported)
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
else if (STRCMP(hi->hi_key, "term_finish") == 0)
|
||||
{
|
||||
if (!(supported & JO2_TERM_FINISH))
|
||||
break;
|
||||
val = get_tv_string(item);
|
||||
if (STRCMP(val, "open") != 0 && STRCMP(val, "close") != 0)
|
||||
{
|
||||
EMSG2(_(e_invarg2), "drop");
|
||||
return FAIL;
|
||||
}
|
||||
opt->jo_set2 |= JO2_TERM_FINISH;
|
||||
opt->jo_term_finish = *val;
|
||||
}
|
||||
#endif
|
||||
else if (STRCMP(hi->hi_key, "waittime") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user