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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog log: correct number of lines to page up/down
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Thu, 26 Mar 2020 18:07:08 +0100

Download raw body.

Thread
On Thu, Mar 26, 2020 at 05:17:51PM +0100, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > How does this look?
> -snip-
> 
> This works great.  The log view now always fetches at least as many
> entries as required to fulfill a scroll request.

Great, thanks for testing :)
 
> It exposes some minor oddities:
> 
> * At startup, one entry too much is fetched.
>   Should commits_needed be initialized to view->nlines - 1 in
>   open_log_view()?
> 
> * Paging down always fetches another maxscroll number of lines,
>   even if fewer would suffice to fulfill the request:
>   Start tog log.  jjjjj... down to the bottom of the screen and scroll
>   a few lines further down.  Go back to the first entry.  Now page
>   down and see the entry count.
> 
> I don't know if these even qualify as issues worth changing.

In my opinion some amount of prefetching doesn't hurt.