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.
This commit is contained in:
Frederik Van Slycken 2015-05-31 10:31:16 +02:00 committed by Justin M. Keyes
parent e54fa04b90
commit e61e4e3285

View File

@ -4745,7 +4745,9 @@ void win_new_width(win_T *wp, int width)
wp->w_redr_status = TRUE; wp->w_redr_status = TRUE;
if (wp->w_buffer->terminal) { 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); redraw_win_later(wp, CLEAR);
} }
} }