summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index 6a834cd..0c2a64e 100644
--- a/ui.c
+++ b/ui.c
@@ -369,8 +369,7 @@ static void unmark(void) {
 	statusUpdate();
 }
 
-void uiShowID(size_t id) {
-	struct Window *window = windowFor(id);
+static void windowShow(struct Window *window) {
 	touchwin(window->pad);
 	windows.other = windows.active;
 	windows.active = window;
@@ -378,6 +377,19 @@ void uiShowID(size_t id) {
 	unmark();
 }
 
+void uiShowID(size_t id) {
+	windowShow(windowFor(id));
+}
+
+void uiShowNum(size_t num) {
+	struct Window *window = windows.head;
+	for (size_t i = 0; i < num; ++i) {
+		window = window->next;
+		if (!window) return;
+	}
+	windowShow(window);
+}
+
 void uiWrite(size_t id, enum Heat heat, const time_t *time, const char *str) {
 	(void)time;
 	struct Window *window = windowFor(id);
@@ -417,6 +429,9 @@ static void keyCode(int code) {
 static void keyMeta(wchar_t ch) {
 	switch (ch) {
 		break; case L'm': uiWrite(windows.active->id, Cold, NULL, "");
+		break; default: {
+			if (ch >= L'0' && ch <= L'9') uiShowNum(ch - L'0');
+		}
 	}
 }
 
/src/commit/bin/psfed.c?id=510d1de054e1a1cbf52fcd16da36ee37b4c22be1&follow=1'>Add psfed, a PSF2 font editorJune McEnroe 2018-09-21Add scheme -i to swap white and blackJune McEnroe 2018-09-21Map caps lock to escape on Linux consoleJune McEnroe 2018-09-19Fix README mandoc lintsJune McEnroe 2018-09-19Un-NOT trans.alpha values in pngoJune McEnroe 2018-09-18Refactor reads in pngo and clear palette between filesJune McEnroe 2018-09-17Add tRNS support to pngoJune McEnroe 2018-09-11Move gfx man pages to gfx/manJune McEnroe 2018-09-11Move bin man pages to bin/manJune McEnroe 2018-09-11Rewrite gfx.7 and render plaintext READMEJune McEnroe 2018-09-11Remove GAMES from BINSJune McEnroe 2018-09-11Rewrite bin.7 and render to plaintext READMEJune McEnroe 2018-09-11Add "blank" lines to man pagesJune McEnroe 2018-09-10Add mdoc syntax fileJune McEnroe 2018-09-08Fix Nm usage in multi-name man pagesJune McEnroe 2018-09-08Put real dates on man pagesJune McEnroe 2018-09-08Replace gfx README with REAMDE.7June McEnroe 2018-09-08Link gfx man pages in ~/.localJune McEnroe