summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-04-03 17:10:52 -0400
committerJune McEnroe <june@causal.agency>2020-04-03 17:10:52 -0400
commit75a6aa9258270169f43f56e063f1bfb57eebe56b (patch)
tree7db2ed9792116bf47541a02829d00da2adccb2ef /ui.c
parentOnly treat /open param as count if single digit (diff)
downloadcatgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.tar.gz
catgirl-75a6aa9258270169f43f56e063f1bfb57eebe56b.zip
Use gnu-case-range and gnu-conditional-omitted-operand extensions
I'm sad to do this but I just can't stand writing (foo ? foo : bar)
anymore.
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ui.c b/ui.c
index 6d9dddc..2a26ac3 100644
--- a/ui.c
+++ b/ui.c
@@ -891,6 +891,7 @@ static void keyCode(int code) {
 		break; case KeyMetaMinus: window->ignore ^= true; reflow(window);
 		break; case KeyMetaSlash: windowShow(windows.swap);
 
+		break; case KeyMeta0 ... KeyMeta9: uiShowNum(code - KeyMeta0);
 		break; case KeyMetaA: showAuto();
 		break; case KeyMetaB: edit(id, EditPrevWord, 0);
 		break; case KeyMetaD: edit(id, EditDeleteNextWord, 0);
@@ -911,12 +912,6 @@ static void keyCode(int code) {
 		break; case KEY_PPAGE: windowScroll(window, +(PAGE_LINES - 2));
 		break; case KEY_RIGHT: edit(id, EditNext, 0);
 		break; case KEY_UP: windowScroll(window, +1);
-		
-		break; default: {
-			if (code >= KeyMeta0 && code <= KeyMeta9) {
-				uiShowNum(code - KeyMeta0);
-			}
-		}
 	}
 }