Commit Diff


commit - e13fe3fb5a1403300ce0653dc3ff74a6f33f9b43
commit + f7140bf5466ac08e50c960b81fbf24800a66c39c
blob - 6782772927c2e0682e87d5728b008b4502aff17b
blob + 0e414ba8af3db6bb003ec9b35d7e1510d7c18632
--- tog/tog.1
+++ tog/tog.1
@@ -100,9 +100,9 @@ The key bindings for
 .Cm tog log
 are as follows:
 .Bl -tag -width Ds
-.It Cm Down-arrow, j, >, Full stop
+.It Cm Down-arrow, j, >, Full stop, Ctrl-n
 Move the selection cursor down.
-.It Cm Up-arrow, k, <, Comma
+.It Cm Up-arrow, k, <, Comma, Ctrl-p
 Move the selection cursor up.
 .It Cm Page-down, Ctrl+f
 Move the selection cursor down one page.
@@ -211,9 +211,9 @@ are as follows:
 .It Cm a
 Toggle treatment of file contents as ASCII text even if binary data was
 detected.
-.It Cm Down-arrow, j
+.It Cm Down-arrow, j, Ctrl-n
 Scroll down.
-.It Cm Up-arrow, k
+.It Cm Up-arrow, k, Ctrl-p
 Scroll up.
 .It Cm Page-down, Space, Ctrl+f
 Scroll down one page.
@@ -278,9 +278,9 @@ The key bindings for
 .Cm tog blame
 are as follows:
 .Bl -tag -width Ds
-.It Cm Down-arrow, j
+.It Cm Down-arrow, j, Ctrl-n
 Move the selection cursor down.
-.It Cm Up-arrow, k
+.It Cm Up-arrow, k, Ctrl-p
 Move the selection cursor up.
 .It Cm Page-down, Space, Ctrl+f
 Move the selection cursor down one page.
@@ -357,9 +357,9 @@ The key bindings for
 .Cm tog tree
 are as follows:
 .Bl -tag -width Ds
-.It Cm Down-arrow, j
+.It Cm Down-arrow, j, Ctrl-n
 Move the selection cursor down.
-.It Cm Up-arrow, k
+.It Cm Up-arrow, k, Ctrl-p
 Move the selection cursor up.
 .It Cm Page-down, Ctrl+f
 Move the selection cursor down one page.
@@ -427,9 +427,9 @@ The key bindings for
 .Cm tog ref
 are as follows:
 .Bl -tag -width Ds
-.It Cm Down-arrow, j
+.It Cm Down-arrow, j, Ctrl-n
 Move the selection cursor down.
-.It Cm Up-arrow, k
+.It Cm Up-arrow, k, Ctrl-p
 Move the selection cursor up.
 .It Cm Page-down, Ctrl+f
 Move the selection cursor down one page.
blob - 15773adb5cfcef6d2e7a96584702408d8908643d
blob + 34a3a30489e4fe3063794bef7d79c9355cd4948f
--- tog/tog.c
+++ tog/tog.c
@@ -2421,6 +2421,7 @@ input_log_view(struct tog_view **new_view, struct tog_
 	case KEY_UP:
 	case '<':
 	case ',':
+	case CTRL('p'):
 		if (s->first_displayed_entry == NULL)
 			break;
 		if (s->selected > 0)
@@ -2449,6 +2450,7 @@ input_log_view(struct tog_view **new_view, struct tog_
 	case KEY_DOWN:
 	case '>':
 	case '.':
+	case CTRL('n'):
 		if (s->first_displayed_entry == NULL)
 			break;
 		if (s->selected < MIN(view->nlines - 2,
@@ -3729,6 +3731,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 		break;
 	case 'k':
 	case KEY_UP:
+	case CTRL('p'):
 		if (s->first_displayed_line > 1)
 			s->first_displayed_line--;
 		break;
@@ -3743,6 +3746,7 @@ input_diff_view(struct tog_view **new_view, struct tog
 		break;
 	case 'j':
 	case KEY_DOWN:
+	case CTRL('n'):
 		if (!s->eof)
 			s->first_displayed_line++;
 		break;
@@ -4589,6 +4593,7 @@ input_blame_view(struct tog_view **new_view, struct to
 		break;
 	case 'k':
 	case KEY_UP:
+	case CTRL('p'):
 		if (s->selected_line > 1)
 			s->selected_line--;
 		else if (s->selected_line == 1 &&
@@ -4609,6 +4614,7 @@ input_blame_view(struct tog_view **new_view, struct to
 		break;
 	case 'j':
 	case KEY_DOWN:
+	case CTRL('n'):
 		if (s->selected_line < view->nlines - 2 &&
 		    s->first_displayed_line +
 		    s->selected_line <= s->blame.nlines)
@@ -5511,6 +5517,7 @@ input_tree_view(struct tog_view **new_view, struct tog
 		break;
 	case 'k':
 	case KEY_UP:
+	case CTRL('p'):
 		if (s->selected > 0) {
 			s->selected--;
 			break;
@@ -5531,6 +5538,7 @@ input_tree_view(struct tog_view **new_view, struct tog
 		break;
 	case 'j':
 	case KEY_DOWN:
+	case CTRL('n'):
 		if (s->selected < s->ndisplayed - 1) {
 			s->selected++;
 			break;
@@ -6291,6 +6299,7 @@ input_ref_view(struct tog_view **new_view, struct tog_
 		break;
 	case 'k':
 	case KEY_UP:
+	case CTRL('p'):
 		if (s->selected > 0) {
 			s->selected--;
 			break;
@@ -6305,6 +6314,7 @@ input_ref_view(struct tog_view **new_view, struct tog_
 		break;
 	case 'j':
 	case KEY_DOWN:
+	case CTRL('n'):
 		if (s->selected < s->ndisplayed - 1) {
 			s->selected++;
 			break;