Download raw body.
u/ctrl-u/d/ctrl-d bindings for scrolling in tog
On Tue, Jun 14, 2022 at 09:03:45PM +0200, Stefan Sperling wrote: > > I would be fine with adding d/u as a half-page scroll in all views, > because these key bindings exist as such in more(1) and less(1). > > We could assign another key than 'd' for showing the last modified date, > such as 'm'. > > Also, if any existing key bindings eventually get in the way of something > else that seems better, we can always change things. There is no rule > which says that anything we decide today must remain this way forever. The patch is bellow. diff ffe3518f1b3ac78ceeac8b605cb0eec2006bae67 /home/misha/work/got blob - e8c907d8d9a4f50f4fdd9cce7cb1d2ebb7b3558b file + tog/tog.1 --- tog/tog.1 +++ tog/tog.1 @@ -108,9 +108,9 @@ 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 Ctrl+d +.It Cm Ctrl+d, d Move the selection cursor down one half page. -.It Cm Ctrl+u +.It Cm Ctrl+u, u Move the selection cursor up one half page. .It Cm Home, g Move the cursor to the newest commit. @@ -223,9 +223,9 @@ Scroll up. Scroll down one page. .It Cm Page-up, Ctrl+b Scroll up one page. -.It Cm Ctrl+d +.It Cm Ctrl+d, d Scroll down one half page. -.It Cm Ctrl+u +.It Cm Ctrl+u, u Scroll up one half page. .It Cm Home, g Scroll to the top of the view. @@ -294,9 +294,9 @@ 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 Ctrl+d +.It Cm Ctrl+d, d Move the selection cursor down one half page. -.It Cm Ctrl+u +.It Cm Ctrl+u, u Move the selection cursor up one half page. .It Cm Home, g Move the selection cursor to the first line of the file. @@ -377,9 +377,9 @@ 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 Ctrl+d +.It Cm Ctrl+d, d Move the selection cursor down one half page. -.It Cm Ctrl+u +.It Cm Ctrl+u, u Move the selection cursor up one half page. .It Cm Home, g Move the selection cursor to the first entry. @@ -451,9 +451,9 @@ 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 Ctrl+d +.It Cm Ctrl+d, d Move the selection cursor down one half page. -.It Cm Ctrl+u +.It Cm Ctrl+u, u Move the selection cursor up one half page. .It Cm Home, g Move the selection cursor to the first reference. blob - 4f4980303045fa4c780164ca0158522fbc0b9867 file + tog/tog.c --- tog/tog.c +++ tog/tog.c @@ -2480,6 +2480,7 @@ input_log_view(struct tog_view **new_view, struct tog_ select_commit(s); break; case CTRL('u'): + case 'u': nscroll /= 2; /* FALL THROUGH */ case KEY_PPAGE: @@ -2532,6 +2533,7 @@ input_log_view(struct tog_view **new_view, struct tog_ break; } case CTRL('d'): + case 'd': nscroll /= 2; /* FALL THROUGH */ case KEY_NPAGE: @@ -3792,6 +3794,7 @@ input_diff_view(struct tog_view **new_view, struct tog s->first_displayed_line--; break; case CTRL('u'): + case 'u': nscroll /= 2; /* FALL THROUGH */ case KEY_PPAGE: @@ -3809,6 +3812,7 @@ input_diff_view(struct tog_view **new_view, struct tog s->first_displayed_line++; break; case CTRL('d'): + case 'd': nscroll /= 2; /* FALL THROUGH */ case KEY_NPAGE: @@ -4672,6 +4676,7 @@ input_blame_view(struct tog_view **new_view, struct to s->first_displayed_line--; break; case CTRL('u'): + case 'u': nscroll /= 2; /* FALL THROUGH */ case KEY_PPAGE: @@ -4827,6 +4832,7 @@ input_blame_view(struct tog_view **new_view, struct to break; } case CTRL('d'): + case 'd': nscroll /= 2; /* FALL THROUGH */ case KEY_NPAGE: @@ -5612,6 +5618,7 @@ input_tree_view(struct tog_view **new_view, struct tog tree_scroll_up(s, 1); break; case CTRL('u'): + case 'u': nscroll /= 2; /* FALL THROUGH */ case KEY_PPAGE: @@ -5640,6 +5647,7 @@ input_tree_view(struct tog_view **new_view, struct tog tree_scroll_down(s, 1); break; case CTRL('d'): + case 'd': nscroll /= 2; /* FALL THROUGH */ case KEY_NPAGE: @@ -6432,6 +6440,7 @@ input_ref_view(struct tog_view **new_view, struct tog_ ref_scroll_up(s, 1); break; case CTRL('u'): + case 'u': nscroll /= 2; /* FALL THROUGH */ case KEY_PPAGE: @@ -6453,6 +6462,7 @@ input_ref_view(struct tog_view **new_view, struct tog_ ref_scroll_down(s, 1); break; case CTRL('d'): + case 'd': nscroll /= 2; /* FALL THROUGH */ case KEY_NPAGE:
u/ctrl-u/d/ctrl-d bindings for scrolling in tog