commit - 5ec66d177df1f41cc1df3f2694ab8e8cee3e6619
commit + a7dd23ad257cf5f2f45268ad73afb49be16ae110
blob - ee792d2677cda12344066e20f5d3356624a8a091
blob + 6c517a10082ad25aa1decab5081f8a1ec8006835
--- 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);