"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:
Sun, 31 Jul 2022 17:30:36 +0200

Download raw body.

Thread
On Mon, Aug 01, 2022 at 01:17:27AM +1000, Mark Jamsek wrote:
> It worked on my terminal--honestly!
> 
> I just looked into this and it appears that on some terminals
> COLOR_PAIRS can be defined as low as 64. On my term, it was defined as
> 32767, which is why it worked for me as we set some colours as high as
> 255 in the previous diff and anything we define must be within the range
> 1 to COLOR_PAIRS-1. So the problem wasn't actually in the tog code but
> in how we defined the DIFF_LINE_* bits.
> 
> The revised diff corrects this.

Indeed, it looks fine now (in gnome-terminal). Thanks!

> But I'll separate the tog colour change
> from the diff code changes and the next/prev file/hunk bits. I'll do
> this tomorrow and shoot them through (including the suggested
> improvements to the diff_{next,prev}_index functions). I was just about
> to go to bed when I thought I'd check my email; I saw this and thought
> wtf?! So had to figure out what happened :)

Hah. Sure, thanks. There is no need to rush.