Commit Diff


commit - 6c13b00592a6253b4a4de885b1f595e141b65281
commit + 4deef56fe9fdbfef7d2ecd12947ff515a0daae78
blob - 58534fe277ad32465d58137945ff09a982d891b2
blob + e1460641f9ff41fe9c556f72f3433b6b500e9dc9
--- tog/tog.1
+++ tog/tog.1
@@ -286,6 +286,10 @@ Move the selection cursor up.
 Move the selection cursor down one page.
 .It Cm Page-up, Ctrl+b
 Move the selection cursor up one page.
+.It Cm Home, g
+Move the selection cursor to the first line of the file.
+.It Cm End, G
+Move the selection cursor to the last line of the file.
 .It Cm Enter
 Open a
 .Cm diff
blob - b9c4abb82f4c3a2becb00e1847dfbb0ef461c37e
blob + 676aa5bfd38d46389ada9f6d333fc7b1eab64913
--- tog/tog.c
+++ tog/tog.c
@@ -4531,6 +4531,22 @@ input_blame_view(struct tog_view **new_view, struct to
 	switch (ch) {
 	case 'q':
 		s->done = 1;
+		break;
+	case 'g':
+	case KEY_HOME:
+		s->selected_line = 1;
+		s->first_displayed_line = 1;
+		break;
+	case 'G':
+	case KEY_END:
+		if (s->blame.nlines < view->nlines - 2) {
+			s->selected_line = s->blame.nlines;
+			s->first_displayed_line = 1;
+		} else {
+			s->selected_line = view->nlines - 2;
+			s->first_displayed_line = s->blame.nlines -
+			    (view->nlines - 3);
+		}
 		break;
 	case 'k':
 	case KEY_UP: