diff options
author | Frederik Van Slycken <frederik.van.slycken@gmail.com> | 2015-05-31 10:31:16 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2015-05-31 11:53:07 -0400 |
commit | e61e4e3285dcbccf3709be49eccac79cc84909ff (patch) | |
tree | 140516e75a8d6b5cd8b4195e8ee164a1b68ba83c | |
parent | e54fa04b90f4c65410b4e6840973242018b477de (diff) | |
download | rneovim-e61e4e3285dcbccf3709be49eccac79cc84909ff.tar.gz rneovim-e61e4e3285dcbccf3709be49eccac79cc84909ff.tar.bz2 rneovim-e61e4e3285dcbccf3709be49eccac79cc84909ff.zip |
fix for #2732 : win_new_width checks height before terminal_resize
When splitting the window (win_split_ins), function win_new_width is
already called before the height has been set. This calls
terminal_resize, which passes a height of 0 on to libvterm, which
doesn't handle a height of 0 properly.
A fix is already in place in terminal.c for not passing on the height,
but strictly speaking, it doesn't make sense for window to call
terminal_resize when it isn't initialized completely yet.
-rw-r--r-- | src/nvim/window.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index ef6b53fe2e..302a957d87 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -4745,7 +4745,9 @@ void win_new_width(win_T *wp, int width) wp->w_redr_status = TRUE; if (wp->w_buffer->terminal) { - terminal_resize(wp->w_buffer->terminal, wp->w_width, 0); + if (wp->w_height != 0) { + terminal_resize(wp->w_buffer->terminal, wp->w_width, 0); + } redraw_win_later(wp, CLEAR); } } |