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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: keymaps to navigate to prev/next file/hunk in the diff
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 1 Aug 2022 09:08:05 +0200

Download raw body.

Thread
On Mon, Aug 01, 2022 at 02:02:22PM +1000, Mark Jamsek wrote:
> Rebased diff is the same as the previous except, as suggested, we now
> error in diff_{prev,next}_index() if the requested line type does not
> exist in the file,

Hmm. Reading this now, making this a hard error does not seem useful.

We always allow users to type keys which trigger a lookup for a
specific line type. If no such type of line exists, neither an
infinite loop nor an error exit are useful.

So perhaps diff_{prev,next}_index() should return void, and behave
like a no-op in case the requested line type does not exist in the
file? From the user's point of view, tog would then not react to the
key at all if there is no line it could jump to.