From 6fe5368ec72986174cc09bc704a4979d642c4267 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Wed, 2 Sep 2020 15:50:13 -0400 Subject: Only call windowUpdate when the shown window needs updating --- ui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui.c') diff --git a/ui.c b/ui.c index a898993..9e86000 100644 --- a/ui.c +++ b/ui.c @@ -477,7 +477,7 @@ static void windowScroll(struct Window *window, int n) { } if (window->scroll < 0) window->scroll = 0; unmark(window); - windowUpdate(); + if (window == windows.ptrs[windows.show]) windowUpdate(); } static void windowScrollPage(struct Window *window, int n) { @@ -534,7 +534,7 @@ void uiWrite(uint id, enum Heat heat, const time_t *src, const char *str) { } window->unreadHard += lines; if (window->scroll) windowScroll(window, lines); - windowUpdate(); + if (window == windows.ptrs[windows.show]) windowUpdate(); if (window->mark && heat > Warm) { beep(); -- cgit 1.4.1