commit e56a17962a1ed2ed7530c92097d09bde36c57383 from: Mark Jamsek date: Mon Apr 24 09:41:17 2023 UTC tog: resize log view if toggling fullscreen from child view We call resize_log_view() when toggling 'F'ullscreen from the log view, but forgot to do this when toggling fullscreen from a child view if its parent is the log view. This fixes a bug that prevents scrolling down the log view from the diff view with the J keymap if already on the last loaded commit. Regress test in the following commit. ok stsp@ commit - 91db220264b6d9be6d44223dd76ae8eb9bea3641 commit + e56a17962a1ed2ed7530c92097d09bde36c57383 blob - 51d1e270d8a161220288c3ad69268b9b6e7d0beb blob + 3be11e9258a6e79e8c65c51e4201e2fe72b26653 --- tog/tog.c +++ tog/tog.c @@ -1852,10 +1852,17 @@ view_input(struct tog_view **new, int *done, struct to if (err) break; } - if (view->parent) + if (view->parent) { + if (view->parent->resize) { + err = view->parent->resize(view->parent, 0); + if (err != NULL) + break; + } err = offset_selection_down(view->parent); - if (!err) - err = offset_selection_down(view); + if (err != NULL) + break; + } + err = offset_selection_down(view); break; case 'S': view->count = 0;