terminal: Account for number column (#5310)

This commit is contained in:
Sam Wilson
2017-10-25 11:18:47 -04:00
parent f0c2f82e90
commit b8a67551d8
5 changed files with 44 additions and 5 deletions

View File

@@ -3747,7 +3747,9 @@ static void win_enter_ext(win_T *wp, bool undo_sync, int curwin_invalid,
do_autochdir();
if (curbuf->terminal) {
terminal_resize(curbuf->terminal, curwin->w_width, curwin->w_height);
terminal_resize(curbuf->terminal,
(uint16_t)(MAX(0, curwin->w_width - win_col_off(curwin))),
(uint16_t)curwin->w_height);
}
}
@@ -4946,7 +4948,9 @@ void win_new_width(win_T *wp, int width)
if (wp->w_buffer->terminal) {
if (wp->w_height != 0) {
terminal_resize(wp->w_buffer->terminal, wp->w_width, 0);
terminal_resize(wp->w_buffer->terminal,
(uint16_t)(MAX(0, curwin->w_width - win_col_off(curwin))),
0);
}
}
}