commit - 87aa0e9809caded0ed6c399e56a0379e4016d76e
commit + 31607d6c745643159f3f25eee25189cf3b5d8cc2
blob - 53ede1f3dfc5ad764f88727e3d729b08a5050549
blob + 3f2551b5751217910c7223a184348710425b4883
--- tog/tog.1
+++ tog/tog.1
.It Cm Tab
Switch focus to the next view.
Cycles through all open views.
+.It Cm Backspace
+Switch focus to the previous view.
+Cycles through all open views.
.El
.Pp
Global options must precede the command name, and are as follows:
.Bl -tag -width Ds
.It Cm Down-arrow, j, Page-down, Space
Scroll down.
-.It Cm Up-arrow, k, Page-up, Backspace
+.It Cm Up-arrow, k, Page-up
Scroll up.
.El
.It Cm blame [ Fl c Ar commit ] [ Fl r Ar repository-path ] Ar path
.Bl -tag -width Ds
.It Cm Down-arrow, j, Page-down, Space
Move the selection cursor down.
-.It Cm Up-arrow, k, Page-up, Backspace
+.It Cm Up-arrow, k, Page-up
Move the selection cursor up.
.It Cm Enter
Switch to the
Switch to the
.Cm log
view for the currently selected tree entry.
-.It Cm Backspace
+.It Cm Left-arrow
Move back to the parent directory.
.It Cm i
Show the object IDs for all objects displayed in the
blob - a69b40efd775bd78863528bd3c09120b6889b2a3
blob + d99b3015676f0794cf14928b542c43c988307260
--- tog/tog.c
+++ tog/tog.c
struct tog_view_list_head *views)
{
const struct got_error *err = NULL;
- struct tog_view *next;
+ struct tog_view *next, *prev;
int ch;
*new = NULL;
else
*focus = TAILQ_FIRST(views);
break;
+ case KEY_BACKSPACE:
+ prev = TAILQ_PREV(view, tog_view_list_head, entry);
+ if (prev)
+ *focus = prev;
+ else
+ *focus = TAILQ_LAST(views, tog_view_list_head);
+ break;
case 'q':
err = view->input(new, dead, view, ch);
*dead = view;
s->first_displayed_line--;
break;
case KEY_PPAGE:
- case KEY_BACKSPACE:
i = 0;
while (i++ < view->nlines - 1 &&
s->first_displayed_line > 1)
s->first_displayed_line--;
break;
case KEY_PPAGE:
- case KEY_BACKSPACE:
if (s->first_displayed_line == 1) {
s->selected_line = 1;
break;
case '\r':
if (s->selected_entry == NULL) {
struct tog_parent_tree *parent;
- case KEY_BACKSPACE:
+ case KEY_LEFT:
/* user selected '..' */
if (s->tree == s->root)
break;