From e61e4e3285dcbccf3709be49eccac79cc84909ff Mon Sep 17 00:00:00 2001 From: Frederik Van Slycken Date: Sun, 31 May 2015 10:31:16 +0200 Subject: 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. --- src/nvim/window.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); } } -- cgit