diff options
author | Bram Moolenaar <Bram@vim.org> | 2018-03-10 20:28:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2018-03-10 20:28:12 +0100 |
commit | 25cdd9c33b21ddbd31321c075873bb225450d2d2 (patch) | |
tree | 380538cdf0abb9b7f3777c57ada6930930c9e036 /src/channel.c | |
parent | b5b7562475ad032a174b893286172de0d2c157cd (diff) | |
download | vim-git-25cdd9c33b21ddbd31321c075873bb225450d2d2.tar.gz |
patch 8.0.1593: :qall never exits with an active terminal windowv8.0.1593
Problem: :qall never exits with an active terminal window.
Solution: Add a way to kill a job in a terminal window.
Diffstat (limited to 'src/channel.c')
-rw-r--r-- | src/channel.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/channel.c b/src/channel.c index 7c574427a..1f41445c6 100644 --- a/src/channel.c +++ b/src/channel.c @@ -4746,50 +4746,57 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) { if (!(supported2 & JO2_TERM_ROWS)) break; - opt->jo_set |= JO2_TERM_ROWS; + opt->jo_set2 |= JO2_TERM_ROWS; opt->jo_term_rows = get_tv_number(item); } else if (STRCMP(hi->hi_key, "term_cols") == 0) { if (!(supported2 & JO2_TERM_COLS)) break; - opt->jo_set |= JO2_TERM_COLS; + opt->jo_set2 |= JO2_TERM_COLS; opt->jo_term_cols = get_tv_number(item); } else if (STRCMP(hi->hi_key, "vertical") == 0) { if (!(supported2 & JO2_VERTICAL)) break; - opt->jo_set |= JO2_VERTICAL; + opt->jo_set2 |= JO2_VERTICAL; opt->jo_vertical = get_tv_number(item); } else if (STRCMP(hi->hi_key, "curwin") == 0) { if (!(supported2 & JO2_CURWIN)) break; - opt->jo_set |= JO2_CURWIN; + opt->jo_set2 |= JO2_CURWIN; opt->jo_curwin = get_tv_number(item); } else if (STRCMP(hi->hi_key, "hidden") == 0) { if (!(supported2 & JO2_HIDDEN)) break; - opt->jo_set |= JO2_HIDDEN; + opt->jo_set2 |= JO2_HIDDEN; opt->jo_hidden = get_tv_number(item); } else if (STRCMP(hi->hi_key, "norestore") == 0) { if (!(supported2 & JO2_NORESTORE)) break; - opt->jo_set |= JO2_NORESTORE; + opt->jo_set2 |= JO2_NORESTORE; opt->jo_term_norestore = get_tv_number(item); } + else if (STRCMP(hi->hi_key, "term_kill") == 0) + { + if (!(supported2 & JO2_TERM_KILL)) + break; + opt->jo_set2 |= JO2_TERM_KILL; + opt->jo_term_kill = get_tv_string_chk(item); + } #endif else if (STRCMP(hi->hi_key, "env") == 0) { if (!(supported2 & JO2_ENV)) break; - opt->jo_set |= JO2_ENV; + opt->jo_set2 |= JO2_ENV; opt->jo_env = item->vval.v_dict; ++item->vval.v_dict->dv_refcount; } @@ -4803,7 +4810,7 @@ get_job_options(typval_T *tv, jobopt_T *opt, int supported, int supported2) EMSG2(_(e_invargval), "cwd"); return FAIL; } - opt->jo_set |= JO2_CWD; + opt->jo_set2 |= JO2_CWD; } else if (STRCMP(hi->hi_key, "waittime") == 0) { |