terminal: handle size when switching buffers in window

This commit is contained in:
Björn Linse
2019-01-26 12:37:38 +01:00
parent 2ab70cb55c
commit 30bd1c1e85
8 changed files with 76 additions and 30 deletions

View File

@@ -1452,7 +1452,8 @@ void scroll_cursor_bot(int min_scroll, int set_topbot)
curwin->w_topline = loff.lnum) {
loff.lnum = curwin->w_topline;
topline_back(&loff);
if (loff.height == MAXCOL || used + loff.height > curwin->w_height_inner) {
if (loff.height == MAXCOL
|| used + loff.height > curwin->w_height_inner) {
break;
}
used += loff.height;