diff src/channel.c @ 13438:33eea5ce5415 v8.0.1593

patch 8.0.1593: :qall never exits with an active terminal window commit https://github.com/vim/vim/commit/25cdd9c33b21ddbd31321c075873bb225450d2d2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 10 20:28:12 2018 +0100 patch 8.0.1593: :qall never exits with an active terminal window Problem: :qall never exits with an active terminal window. Solution: Add a way to kill a job in a terminal window.
author Christian Brabandt <cb@256bit.org>
date Sat, 10 Mar 2018 20:30:04 +0100
parents fa198b71bab2
children 6faef782f50b
line wrap: on
line diff
--- a/src/channel.c
+++ b/src/channel.c
@@ -4746,50 +4746,57 @@ get_job_options(typval_T *tv, jobopt_T *
 	    {
 		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 *
 		    EMSG2(_(e_invargval), "cwd");
 		    return FAIL;
 		}
-		opt->jo_set |= JO2_CWD;
+		opt->jo_set2 |= JO2_CWD;
 	    }
 	    else if (STRCMP(hi->hi_key, "waittime") == 0)
 	    {