diff options
author | Sam Wilson <sawilson@akamai.com> | 2017-10-25 11:18:47 -0400 |
---|---|---|
committer | Sam Wilson <sawilson@akamai.com> | 2017-10-27 17:59:54 -0400 |
commit | b8a67551d8360ba095d1ffdbc9f8c40b612e9320 (patch) | |
tree | bdb65764141d727e709a7c4d04a65f0dde271e18 /src/nvim/eval.c | |
parent | f0c2f82e90046487a8c12c10ca6c8da23470ef09 (diff) | |
download | rneovim-b8a67551d8360ba095d1ffdbc9f8c40b612e9320.tar.gz rneovim-b8a67551d8360ba095d1ffdbc9f8c40b612e9320.tar.bz2 rneovim-b8a67551d8360ba095d1ffdbc9f8c40b612e9320.zip |
terminal: Account for number column (#5310)
Diffstat (limited to 'src/nvim/eval.c')
-rw-r--r-- | src/nvim/eval.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c index aab777955c..ef2f671f36 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -16723,9 +16723,10 @@ static void f_termopen(typval_T *argvars, typval_T *rettv, FunPtr fptr) } } + uint16_t term_width = MAX(0, curwin->w_width - win_col_off(curwin)); TerminalJobData *data = common_job_init(argv, on_stdout, on_stderr, on_exit, true, false, false, cwd); - data->proc.pty.width = curwin->w_width; + data->proc.pty.width = term_width; data->proc.pty.height = curwin->w_height; data->proc.pty.term_name = xstrdup("xterm-256color"); if (!common_job_start(data, rettv)) { @@ -16733,7 +16734,7 @@ static void f_termopen(typval_T *argvars, typval_T *rettv, FunPtr fptr) } TerminalOptions topts; topts.data = data; - topts.width = curwin->w_width; + topts.width = term_width; topts.height = curwin->w_height; topts.write_cb = term_write; topts.resize_cb = term_resize; |