Only skip setting swap in windowShow

With the early return, mainUpdate doesn't get called in cases where
other functions expect windowShow to call it, such as when closing
or moving windows.
weechat-hashes
C. McEnroe 2021-01-29 23:24:58 -05:00
parent d16ee121e5
commit 89a2fac05a
1 changed files with 4 additions and 3 deletions

7
ui.c
View File

@ -770,10 +770,11 @@ static void inputUpdate(void) {
}
static void windowShow(uint num) {
windows.user = num;
if (windows.show == num) return;
windows.swap = windows.show;
if (num != windows.show) {
windows.swap = windows.show;
}
windows.show = num;
windows.user = num;
mark(windows.ptrs[windows.swap]);
unmark(windows.ptrs[windows.show]);
mainUpdate();