patch 8.0.0908: cannot set terminal size with options
Problem: Cannot set terminal size with options.
Solution: Add "term_rows", "term_cols" and "vertical".
diff --git a/src/terminal.c b/src/terminal.c
index c215b3f..bab2a5b 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -237,8 +237,10 @@
opt->jo_io_buf[PART_OUT] = curbuf->b_fnum;
opt->jo_io_buf[PART_ERR] = curbuf->b_fnum;
opt->jo_pty = TRUE;
- opt->jo_term_rows = rows;
- opt->jo_term_cols = cols;
+ if ((opt->jo_set2 & JO2_TERM_ROWS) == 0)
+ opt->jo_term_rows = rows;
+ if ((opt->jo_set2 & JO2_TERM_COLS) == 0)
+ opt->jo_term_cols = cols;
}
static void
@@ -2361,11 +2363,14 @@
if (argvars[1].v_type != VAR_UNKNOWN
&& get_job_options(&argvars[1], &opt,
JO_TIMEOUT_ALL + JO_STOPONEXIT
- + JO_EXIT_CB + JO_CLOSE_CALLBACK
- + JO2_TERM_NAME + JO2_TERM_FINISH
- + JO2_CWD + JO2_ENV) == FAIL)
+ + JO_EXIT_CB + JO_CLOSE_CALLBACK,
+ JO2_TERM_NAME + JO2_TERM_FINISH
+ + JO2_TERM_COLS + JO2_TERM_ROWS + JO2_VERTICAL
+ + JO2_CWD + JO2_ENV) == FAIL)
return;
+ if (opt.jo_vertical)
+ cmdmod.split = WSP_VERT;
term_start(cmd, &opt);
if (curbuf->b_term != NULL)