about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-09 07:46:30 -0500
committerJune McEnroe <june@causal.agency>2020-02-09 07:46:30 -0500
commit26eefa35c90760536a2045a5d097e7670613c4b0 (patch)
treefd9bb5788a878b1936a484293aaf0ebcd2e0c6d9 /ui.c
parentUse iswspace for word movement (diff)
downloadcatgirl-26eefa35c90760536a2045a5d097e7670613c4b0.tar.gz
catgirl-26eefa35c90760536a2045a5d097e7670613c4b0.zip
Add C-n and C-p
Diffstat (limited to '')
-rw-r--r--ui.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ui.c b/ui.c
index d946854..8d0f0f7 100644
--- a/ui.c
+++ b/ui.c
@@ -565,6 +565,7 @@ static void inputUpdate(void) {
 }
 
 static void windowShow(struct Window *window) {
+	if (!window) return;
 	touchwin(window->pad);
 	windows.other = windows.active;
 	windows.active = window;
@@ -662,6 +663,8 @@ static void keyCtrl(wchar_t ch) {
 		break; case L'J': edit(id, EditEnter, 0);
 		break; case L'K': edit(id, EditDeleteTail, 0);
 		break; case L'L': clearok(curscr, true);
+		break; case L'N': windowShow(windows.active->next);
+		break; case L'P': windowShow(windows.active->prev);
 		break; case L'U': edit(id, EditDeleteHead, 0);
 		break; case L'W': edit(id, EditDeletePrevWord, 0);
 		break; case L'Y': edit(id, EditPaste, 0);