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');
+		}
 	}
 }
 
alaver/pounce-palaver.1?h=2.2&id=aede92502c4fcf759f4fa4d6965595aee645c0a8&follow=1'>contrib/palaver: Add no message preview flagsJune McEnroe 2020-08-13contrib/palaver: Don't set channel for PMsJune McEnroe 2020-08-13Fix unintended interception of NICK after registrationJune McEnroe 2020-08-12Add Additional Components section to READMEJune McEnroe 2020-08-12Document -L / palaver optionJune McEnroe 2020-08-11contrib/palaver: Document service configurationJune McEnroe 2020-08-11contrib/palaver: Add install target and rc scriptJune McEnroe 2020-08-11contrib/palaver: Implement command and notificationsJune McEnroe