add ^B/^F key bindings for page up/down in the "blame" and "tree" views
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
diff --git a/tog/tog.1 b/tog/tog.1
index dc2613f..0dd6540 100644
--- a/tog/tog.1
+++ b/tog/tog.1
@@ -211,10 +211,14 @@ The key bindings for
.Cm tog blame
are as follows:
.Bl -tag -width Ds
-.It Cm Down-arrow, j, Page-down, Space
+.It Cm Down-arrow, j
Move the selection cursor down.
-.It Cm Up-arrow, k, Page-up
+.It Cm Up-arrow, k
Move the selection cursor up.
+.It Cm Page-down, Space, Ctrl+f
+Move the selection cursor down one page.
+.It Cm Page-up, Ctrl+b
+Move the selection cursor up one page.
.It Cm Enter
Open a
.Cm diff
@@ -277,10 +281,14 @@ The key bindings for
.Cm tog tree
are as follows:
.Bl -tag -width Ds
-.It Cm Down-arrow, j, Page-down
+.It Cm Down-arrow, j
Move the selection cursor down.
-.It Cm Up-arrow, k, Page-up
+.It Cm Up-arrow, k
Move the selection cursor up.
+.It Cm Page-down, Ctrl+f
+Move the selection cursor down one page.
+.It Cm Page-up, Ctrl+b
+Move the selection cursor up one page.
.It Cm Enter
Enter the currently selected directory, or switch to the
.Cm blame
diff --git a/tog/tog.c b/tog/tog.c
index 9e80090..cedb43d 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -4164,6 +4164,7 @@ input_blame_view(struct tog_view **new_view, struct tog_view **dead_view,
s->first_displayed_line--;
break;
case KEY_PPAGE:
+ case CTRL('b'):
if (s->first_displayed_line == 1) {
s->selected_line = 1;
break;
@@ -4319,6 +4320,7 @@ input_blame_view(struct tog_view **new_view, struct tog_view **dead_view,
break;
}
case KEY_NPAGE:
+ case CTRL('f'):
case ' ':
if (s->last_displayed_line >= s->blame.nlines &&
s->selected_line >= MIN(s->blame.nlines,
@@ -5038,6 +5040,7 @@ input_tree_view(struct tog_view **new_view, struct tog_view **dead_view,
s->tree, s->tree == s->root);
break;
case KEY_PPAGE:
+ case CTRL('b'):
tree_scroll_up(view, &s->first_displayed_entry,
MAX(0, view->nlines - 4 - s->selected), s->tree,
s->tree == s->root);
@@ -5060,6 +5063,7 @@ input_tree_view(struct tog_view **new_view, struct tog_view **dead_view,
s->last_displayed_entry, s->tree);
break;
case KEY_NPAGE:
+ case CTRL('f'):
if (got_tree_entry_get_next(s->tree, s->last_displayed_entry)
== NULL) {
/* can't scroll any further; move cursor down */