1
0
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:
Bram Moolenaar
2017-08-10 23:15:19 +02:00
parent 8ab3c1dc6b
commit dd693ce28b
7 changed files with 160 additions and 37 deletions

View File

@@ -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)
{