diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-10-28 18:02:21 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-10-28 18:02:21 +0200 |
commit | 8c732f7274145805be817c481e313059bce9f037 (patch) | |
tree | 6b16f4cbda3088746846570ea1f3b9be29b475e5 /src/nvim/eval.c | |
parent | da13d9a30cf7a5428649a24f8761ae1d5dbc1f02 (diff) | |
parent | bcf266de46b054b564727d5d31e4421ba09f5704 (diff) | |
download | rneovim-8c732f7274145805be817c481e313059bce9f037.tar.gz rneovim-8c732f7274145805be817c481e313059bce9f037.tar.bz2 rneovim-8c732f7274145805be817c481e313059bce9f037.zip |
Merge #7440 "terminal: adjust for 'number'"
closes #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; |