commit - 48fcc5120f87139d1a23de231cfabc056bde12cd
commit + e4197bf9f24ba3b4296cb37b5648c5ce72577e05
blob - 96401a7bddaa9994c55d144582c988b4f1ae09f2
blob + a69b40efd775bd78863528bd3c09120b6889b2a3
--- tog/tog.c
+++ tog/tog.c
static const struct got_error *
view_input(struct tog_view **new, struct tog_view **dead,
- struct tog_view **focus, struct tog_view *view,
+ struct tog_view **focus, int *done, struct tog_view *view,
struct tog_view_list_head *views)
{
const struct got_error *err = NULL;
case 'q':
err = view->input(new, dead, view, ch);
*dead = view;
+ break;
+ case 'Q':
+ *done = 1;
break;
case KEY_RESIZE:
err = view_resize(view);
const struct got_error *err = NULL;
struct tog_view_list_head views;
struct tog_view *new_view, *dead_view;
+ int done = 0;
TAILQ_INIT(&views);
TAILQ_INSERT_HEAD(&views, view, entry);
- while (!TAILQ_EMPTY(&views)) {
+ while (!TAILQ_EMPTY(&views) && !done) {
err = view_show(view);
if (err)
break;
- err = view_input(&new_view, &dead_view, &view, view, &views);
+ err = view_input(&new_view, &dead_view, &view, &done,
+ view, &views);
if (err)
break;
if (new_view) {