summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--catgirl.16
-rw-r--r--ui.c14
2 files changed, 18 insertions, 2 deletions
diff --git a/catgirl.1 b/catgirl.1
index 7988e9d..2638d6f 100644
--- a/catgirl.1
+++ b/catgirl.1
@@ -1,4 +1,4 @@
-.Dd February 23, 2019
+.Dd February 25, 2019
 .Dt CATGIRL 1
 .Os
 .
@@ -300,7 +300,9 @@ Redraw the UI.
 .It Ic C-n
 Switch to the next window.
 .It Ic C-p
-Swittch to the previous window.
+Switch to the previous window.
+.It Ic M-a
+Switch to next hot or unread window.
 .It Ic M-m
 Insert a blank line in the window.
 .It Ic M- Ns Ar n
diff --git a/ui.c b/ui.c
index e31e824..ab519b6 100644
--- a/ui.c
+++ b/ui.c
@@ -367,6 +367,19 @@ void uiShowNum(int num, bool relative) {
 	uiPrompt(false);
 }
 
+static void uiShowAuto(void) {
+	struct Window *unread = NULL;
+	struct Window *hot;
+	for (hot = windows.head; hot; hot = hot->next) {
+		if (hot->hot) break;
+		if (!unread && hot->unread) unread = hot;
+	}
+	if (!hot && !unread) return;
+	windowShow(hot ? hot : unread);
+	uiStatus();
+	uiPrompt(false);
+}
+
 void uiCloseTag(struct Tag tag) {
 	windowClose(windowFor(tag));
 	uiStatus();
@@ -447,6 +460,7 @@ static void keyCode(wchar_t code) {
 static void keyMeta(wchar_t ch) {
 	struct Window *win = windows.active;
 	if (ch >= L'0' && ch <= L'9') uiShowNum(ch - L'0', false);
+	if (ch == L'a') uiShowAuto();
 	if (!win) return;
 	switch (ch) {
 		break; case L'b':  edit(win->tag, EditBackWord, 0);
/txt/books.txt?id=9bfb1b3cbb2e9c808195bbe67eb77b8a024ae48f&follow=1'>Add The Awakened KingdomJune McEnroe 2020-09-12Move /opt/local back, cheat port select to use system manJune McEnroe 2020-09-12Move /opt/local behind /usr againJune McEnroe 2020-09-12Enable toc in cgit renderings of man pagesJune McEnroe 2020-09-11Install mandoc on macOSJune McEnroe 2020-09-11Rewrite install script yet againJune McEnroe 2020-09-11Remove NetBSD from install scriptJune McEnroe 2020-09-11Use MacPorts rather than pkgsrcJune McEnroe 2020-09-11Add debian VM name to sshJune McEnroe 2020-09-11Add influencer tweetJune McEnroe 2020-09-10Add The Kingdom of GodsJune McEnroe 2020-09-07Add SunglassesJune McEnroe 2020-09-06Add Between the BreathsJune McEnroe 2020-09-04Open /dev/tty in nudgeJune McEnroe 2020-09-04Add nudgeJune McEnroe 2020-09-03Build fbclock with -lzJune McEnroe 2020-08-29Add tweets from retweetsJune McEnroe