Commit 5c123d7e57cb1fe21fd82443ba7932836ba94772

Stefan Sperling 2019-02-21T21:42:10

make tog's diff view commit selection keys also work in log view

diff --git a/tog/tog.1 b/tog/tog.1
index 1ab6e36..b6b01ca 100644
--- a/tog/tog.1
+++ b/tog/tog.1
@@ -83,9 +83,9 @@ The key bindings for
 .Cm tog log
 are as follows:
 .Bl -tag -width Ds
-.It Cm Down-arrow, j, Page-down
+.It Cm Down-arrow, j, Page-down, >, Full stop
 Move the selection cursor down.
-.It Cm Up-arrow, k, Page-up
+.It Cm Up-arrow, k, Page-up, <, Comma
 Move the selection cursor up.
 .It Cm Enter
 Open a
diff --git a/tog/tog.c b/tog/tog.c
index c4a116d..dfd3a50 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -1484,6 +1484,8 @@ input_log_view(struct tog_view **new_view, struct tog_view **dead_view,
 			break;
 		case 'k':
 		case KEY_UP:
+		case '<':
+		case ',':
 			if (s->first_displayed_entry == NULL)
 				break;
 			if (s->selected > 0)
@@ -1506,6 +1508,8 @@ input_log_view(struct tog_view **new_view, struct tog_view **dead_view,
 			break;
 		case 'j':
 		case KEY_DOWN:
+		case '>':
+		case '.':
 			if (s->first_displayed_entry == NULL)
 				break;
 			if (s->selected < MIN(view->nlines - 2,