commit e0bcabc59053f9a9eb0fe046fcdc49d36eb46273 from: Mark Jamsek via: Thomas Adam date: Fri Apr 28 11:41:25 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 - 10120e3cdd52ef9499536afebec2d2d4d963036a commit + e0bcabc59053f9a9eb0fe046fcdc49d36eb46273 blob - 05e860c2249763b21edc821873f6c54997e93a17 blob + c6b45a32b54dddc57684075b72aaf17d79656663 --- tog/tog.c +++ tog/tog.c @@ -1856,10 +1856,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;