Only scroll after reflow if necessary

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

6
ui.c
View File

@ -634,8 +634,10 @@ static void reflow(struct Window *window) {
}
flowed += lines;
}
wscrl(window->pad, -(WindowLines - 1 - flowed));
wmove(window->pad, WindowLines - 1, RIGHT);
if (flowed < WindowLines) {
wscrl(window->pad, -(WindowLines - 1 - flowed));
wmove(window->pad, WindowLines - 1, RIGHT);
}
}
static void resize(void) {