"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: small tog split view regression
To:
Omar Polo <op@omarpolo.com>
Cc:
Mark Jamsek <mark@jamsek.com>, gameoftrees@openbsd.org
Date:
Thu, 30 Jun 2022 12:23:47 +0200

Download raw body.

Thread
On Thu, Jun 30, 2022 at 11:09:40AM +0200, Omar Polo wrote:
> > --- tog/tog.c
> > +++ tog/tog.c
> > @@ -781,6 +781,12 @@ view_is_splitscreen(struct tog_view *view)
> >  	return view->begin_x > 0 || view->begin_y > 0;
> >  }
> >  
> > +static int
> > +view_is_fullscreen(struct tog_view *view)
> > +{
> > +	return view->nlines == LINES && view->ncols == COLS;
> 
> still have to test the diff but there is a reason for LINES and COLS
> here instead of view->lines/cols?  I'm worried that view->lines and
> LINES could go out-of-sync temporarly during a resize.

Checking against our cached copies of LINES and COLS doesn't fix the bug.