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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: fix some OB1s in view rendering
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Wed, 1 Feb 2023 13:28:02 +0100

Download raw body.

Thread
On Wed, Feb 01, 2023 at 06:09:05PM +1100, Mark Jamsek wrote:
> I noticed an off-by-one error by chance when perusing old backup refs.
> To reproduce, reduce the width of your terminal to a width that is just
> one column greater than a given ref entry string (this can be lengthened
> by toggling 'i' and 'm'), and notice we don't insert '\n' at the end of
> the ref string so the next entry begins on the same line and wraps
> around.
> 
> I figured there's a good chance we do this elsewhere, and found the same
> problem in our tree view. Reduce screen width to 30 columns and
> navigate to:
> 
>   "/gotwebd/files/htdocs/gotwebd/android-chrome-192x192.png"
> 
> and observe how the next file (android-chrome-384x384.png) starts at the
> end of this entry and wraps to the next line.
> 
> While not quite the same problem, I noticed we weren't drawing to the
> last column in our help view, so the diff makes a small change here too.
> 
> ok?

Thank for you for spotting this, providing an easy way to reproduce,
and even going the last mile by spotting related issues elsewhere :)
Great work!  The fix works as expected for me.  ok stsp