make tog's diff view commit selection keys also work in log view
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
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,