commit - e5a0f69f558eebfc5ff9c994a48dc1dda2ba8b86
commit + 48fcc5120f87139d1a23de231cfabc056bde12cd
blob - cab4c27a9b5f22859bb24cea712e3fc2fc4a2ad9
blob + 96401a7bddaa9994c55d144582c988b4f1ae09f2
--- tog/tog.c
+++ tog/tog.c
}
static const struct got_error *
-view_input(struct tog_view **new, struct tog_view **dead, struct tog_view *view)
+view_input(struct tog_view **new, struct tog_view **dead,
+ struct tog_view **focus, struct tog_view *view,
+ struct tog_view_list_head *views)
{
const struct got_error *err = NULL;
+ struct tog_view *next;
int ch;
*new = NULL;
nodelay(stdscr, TRUE);
switch (ch) {
case ERR:
+ break;
+ case '\t':
+ next = TAILQ_NEXT(view, entry);
+ if (next)
+ *focus = next;
+ else
+ *focus = TAILQ_FIRST(views);
break;
case 'q':
err = view->input(new, dead, view, ch);
err = view_show(view);
if (err)
break;
- err = view_input(&new_view, &dead_view, view);
+ err = view_input(&new_view, &dead_view, &view, view, &views);
if (err)
break;
if (new_view) {