summary refs log tree commit diff
diff options
context:
space:
mode:
-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');
+		}
 	}
 }
 
d03569&follow=1'>Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe There is not that much distinct stuff here anymore. 2022-07-03Add The Bone Shard EmperorJune McEnroe Suffers a little bit from middle book but I really enjoyed it. Read it faster than the first one too, despite its length. 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe Mixed bag like most collections of short stories. Some of them are pretty good. The author of the worst written story also has the worst written bio. 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe Absolutely indiscriminately. 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe For some reason I haven't been able to figure out, trying to poll /dev/tty returns POLLNVAL (and this was using 100% CPU looping), but using stderr instead works fine. 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe