Only reflow text when COLS changes

master
C. McEnroe 2020-02-05 18:01:57 -05:00
parent 2d5f608cc5
commit eb91347308
1 changed files with 3 additions and 1 deletions

4
ui.c
View File

@ -434,7 +434,9 @@ static void reflow(struct Window *window) {
}
static void resize(void) {
// FIXME: Only reflow when COLS changes.
int height, width;
getmaxyx(windows.active->pad, height, width);
if (width == COLS) return;
for (struct Window *window = windows.head; window; window = window->next) {
wresize(window->pad, BufferCap, COLS);
reflow(window);