commit - 34a842a42b1cd020ca656445c0b65e67a97bff1a
commit + 94274a8f75da950b87727bc93439723aac3ea64c
blob - 5c09963ecada6bf7e25973970995b395066f23c5
blob + d0e2232056d2d697f05b40c9afc178d451401450
--- tog/tog.c
+++ tog/tog.c
*requested = NULL;
- if (view_is_parent_view(view))
+ if (view_is_parent_view(view) && request != TOG_VIEW_HELP)
view_get_split(view, &y, &x);
err = view_dispatch_request(&new_view, view, request, y, x);
if (err)
return err;
- if (view_is_parent_view(view) && view->mode == TOG_VIEW_SPLIT_HRZN) {
+ if (view_is_parent_view(view) && view->mode == TOG_VIEW_SPLIT_HRZN &&
+ request != TOG_VIEW_HELP) {
err = view_init_hsplit(view, y);
if (err)
return err;
view->focussed = 0;
new_view->focussed = 1;
new_view->mode = view->mode;
- new_view->nlines = view->lines - y;
+ new_view->nlines = request == TOG_VIEW_HELP ?
+ view->lines : view->lines - y;
- if (view_is_parent_view(view)) {
+ if (view_is_parent_view(view) && request != TOG_VIEW_HELP) {
view_transfer_size(new_view, view);
err = view_close_child(view);
if (err)
view_close(*new_view);
break;
case TOG_VIEW_HELP:
- *new_view = view_open(0, 0, y, x, TOG_VIEW_HELP);
+ *new_view = view_open(0, 0, 0, 0, TOG_VIEW_HELP);
if (*new_view == NULL)
return got_error_from_errno("view_open");
err = open_help_view(*new_view, view);