summary refs log tree commit diff
diff options
context:
space:
mode:
authorJeremy O'Brien2021-01-19 11:52:43 -0500
committerC. McEnroe2021-01-19 12:14:43 -0500
commit1fbc8fe3948a739a2101e0e70af1e0049b8e7837 (patch)
tree445a28d43cc29e22ac5e5b72a1fd2cd050db8cce
parent965b6987a9e2965e05ac19cf25523a12cb58dff4 (diff)
Don't lose swapped window when navigating to current buffer
-rw-r--r--ui.c3
1 files changed, 2 insertions, 1 deletions
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();