summaryrefslogtreecommitdiff
path: root/src/terminal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-08-11 21:51:23 +0200
committerBram Moolenaar <Bram@vim.org>2017-08-11 21:51:23 +0200
commit08d384ff3aa0366c18fb87ed215b1b4bdf9b1745 (patch)
tree82bc9560e86e147774f27b096124968385c07434 /src/terminal.c
parent89e06c807ac63030dd163092e1c58f9ce350aeee (diff)
downloadvim-git-08d384ff3aa0366c18fb87ed215b1b4bdf9b1745.tar.gz
patch 8.0.0908: cannot set terminal size with optionsv8.0.0908
Problem: Cannot set terminal size with options. Solution: Add "term_rows", "term_cols" and "vertical".
Diffstat (limited to 'src/terminal.c')
-rw-r--r--src/terminal.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/terminal.c b/src/terminal.c
index c215b3fa8..bab2a5ba4 100644
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -237,8 +237,10 @@ setup_job_options(jobopt_T *opt, int rows, int cols)
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 @@ f_term_start(typval_T *argvars, typval_T *rettv)
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)