"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Mikhail <mp39590@gmail.com>
Subject:
tog: = and * keybindings for <home> and <end> respectively
To:
gameoftrees@openbsd.org
Date:
Sat, 7 Jan 2023 22:17:37 +0300

Download raw body.

Thread
While in tog I keep pressing those keys just like I'd do in mutt, since
'tog log' view is more like mutt for me than like 'less'. Since we have
J and K for tog diff, which mimics mutt's next/prev email, maybe such
keybindings can be used too?

diff /home/misha/work/got
commit - a5d6823449b7d974ef01516c247fd832002e7e03
path + /home/misha/work/got
blob - 5cd04f84a4375fd57061db8ea8ed4030f0350461
file + tog/tog.1
--- tog/tog.1
+++ tog/tog.1
@@ -165,9 +165,9 @@ Move the selection cursor up N half pages (default: 1)
 Move the selection cursor down N half pages (default: 1).
 .It Cm Ctrl+u, u
 Move the selection cursor up N half pages (default: 1).
-.It Cm Home, g
+.It Cm Home, g, =
 Move the cursor to the newest commit.
-.It Cm End, G
+.It Cm End, G, *
 Move the cursor to the oldest commit.
 This will traverse all commits on the current branch which may take
 a long time depending on the number of commits in branch history.
blob - 90aaa1e85a54a8310a42a9808b283bd3580d4bda
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -3692,6 +3692,7 @@ input_log_view(struct tog_view **new_view, struct tog_
 		log_move_cursor_up(view, 0, 0);
 		break;
 	case 'g':
+	case '=':
 	case KEY_HOME:
 		log_move_cursor_up(view, 0, 1);
 		view->count = 0;
@@ -3716,6 +3717,7 @@ input_log_view(struct tog_view **new_view, struct tog_
 		s->use_committer = !s->use_committer;
 		break;
 	case 'G':
+	case '*':
 	case KEY_END: {
 		/* We don't know yet how many commits, so we're forced to
 		 * traverse them all. */