Only scroll after reflow if necessary

If we've already filled up every line of the window, there is no need to
scroll.
master
C. McEnroe 2020-02-17 11:57:29 -05:00
parent fa29c37911
commit cf83e95114
1 changed files with 4 additions and 2 deletions

2
ui.c
View File

@ -634,9 +634,11 @@ static void reflow(struct Window *window) {
} }
flowed += lines; flowed += lines;
} }
if (flowed < WindowLines) {
wscrl(window->pad, -(WindowLines - 1 - flowed)); wscrl(window->pad, -(WindowLines - 1 - flowed));
wmove(window->pad, WindowLines - 1, RIGHT); wmove(window->pad, WindowLines - 1, RIGHT);
} }
}
static void resize(void) { static void resize(void) {
mvwin(marker, LINES - 2, 0); mvwin(marker, LINES - 2, 0);