From 1fbc8fe3948a739a2101e0e70af1e0049b8e7837 Mon Sep 17 00:00:00 2001 From: Jeremy O'Brien Date: Tue, 19 Jan 2021 11:52:43 -0500 Subject: Don't lose swapped window when navigating to current buffer --- ui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui.c b/ui.c index 097d3d8..090a247 100644 --- a/ui.c +++ b/ui.c @@ -733,9 +733,10 @@ static void inputUpdate(void) { } static void windowShow(uint num) { + windows.user = num; + if (windows.show == num) return; windows.swap = windows.show; windows.show = num; - windows.user = num; mark(windows.ptrs[windows.swap]); unmark(windows.ptrs[windows.show]); windowUpdate(); -- cgit 1.4.1