Download raw body.
tog: child views don't resize properly
On Sun, Dec 06, 2020 at 07:01:54PM +0100, Christian Weisgerber wrote:
> It looks like child views in tog don't get passed KEY_RESIZE.
>
> It's noticeable when you move the selection to the bottom,
> then shrink the window, and the selection remains invisible.
> Also, a child log view does not load additional commits when the
> window grows.
>
> The diff view doesn't lend itself to this, but everything else is
> affected:
>
> log -> tree
> log -> ref
> tree -> blame
> tree -> log
> tree -> ref
> ref -> log
> ref -> tree
>
Nice catch. This appears to fix it.
diff b40849210901ab28dca174479bf531ca640d1be0 /home/stsp/src/got
blob - 9e53eff955375e190b79ce94ff500594caea8f04
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -847,6 +847,15 @@ view_input(struct tog_view **new, int *done, struct to
err = v->input(new, v, KEY_RESIZE);
if (err)
return err;
+ if (v->child) {
+ err = view_resize(v->child);
+ if (err)
+ return err;
+ err = v->child->input(new, v->child,
+ KEY_RESIZE);
+ if (err)
+ return err;
+ }
}
}
tog: child views don't resize properly