Download raw body.
small tog split view regression
On 22-06-30 01:27am, Mark Jamsek wrote:
> On 22-06-29 05:20pm, Stefan Sperling wrote:
> > commit 6131ff18e81056001a823f913094a92c10580cba introduced a regression
> > in tog's handling of vertical split:
> >
> > commit 6131ff18e81056001a823f913094a92c10580cba
> > from: Mark Jamsek <mark@jamsek.dev>
> > date: Mon Jun 20 15:54:31 2022 UTC
> >
> > fix fullscreen view regression introduced in 0dbbbe90fd
> >
> > The problem I observe can be reproduced as follows:
> >
> > - start tog in a large terminal
> > - hit Enter to open a diff view in a vertical split screen
> > - shrink your terminal to 80x24 -> diff view is now fullscreen
> > - make the terminal large again
> >
> > Expected result:
> > vertical split showing both log/diff view is restored
> >
> > Result since commit 6131ff1:
> > diff view remains in fullscreen across the large terminal
> >
> > The patch below prevents this problem. Is this the right fix?
> > Asking because the patch reverts a part of commit 6131ff1, and
> > I cannot tell if doing so will re-introduce a different issue.
>
> Yes, this is the right fix. I'd forgotten about this; op also mentioned
> this earlier. Thanks!
Actually, no. This breaks something else:
$ tog # term wide enough to vsplit
return # open commit
f # fullscreen commit
tab # should go to fullscreen log, but it splits the screen
So effectivley we can't get to a fullscreen parent view when a child
view is opened.
> > diff /home/stsp/src/got
> > commit - 8c4a6db8547e314f29117f820ab5f99722b980fb
> > path + /home/stsp/src/got
> > blob - 3ec7da1db803f36693a814f77125861f3ac2095e
> > file + tog/tog.c
> > --- tog/tog.c
> > +++ tog/tog.c
> > @@ -774,7 +774,7 @@ view_resize(struct tog_view *view)
> > else
> > ncols = view->ncols + (COLS - view->cols);
> >
> > - if (view->child && view_is_splitscreen(view->child)) {
> > + if (view->child) {
> > view->child->begin_x = view_split_begin_x(view->begin_x);
> > if (view->child->begin_x == 0) {
> > ncols = COLS;
> >
> >
> >
>
> --
> Mark Jamsek <fnc.bsdbox.org>
> GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68
--
Mark Jamsek <fnc.bsdbox.org>
GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68
small tog split view regression