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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: [rfc] tog horizontal scroll (diff & blame view)
To:
Mark Jamsek <mark@jamsek.com>, gameoftrees@openbsd.org
Date:
Thu, 16 Jun 2022 10:12:32 +0200

Download raw body.

Thread
On Thu, Jun 16, 2022 at 09:15:24AM +0200, Stefan Sperling wrote:
> I found two issues while testing it:

Omar Polo identified another problem on IRC:

09:47 < op2> look at the 'implement horizontal scrolling for tog' diff in tog
09:47 < op2> scroll a bit in the expand_tab function
09:47 < op2> empty lines added don't have the leading + in the diff

This fixes the issue.

diff 1a2197ef21916d5463fd58db659fbc9f2b0f726d /home/stsp/src/got
blob - 5d194fe61eb77d2dcf1a9c4afa9fc79f5a0f2151
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -3187,7 +3187,7 @@ draw_file(struct tog_view *view, const char *header)
 				free(line);
 				return err;
 			}
-			if (view->x < width - 1)
+			if (view->x < width)
 				waddwstr(view->window, wline + view->x);
 			free(wline);
 			wline = NULL;