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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: 'n' before '/'
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 24 Jan 2021 15:22:17 +0100

Download raw body.

Thread
On Sun, Jan 24, 2021 at 02:06:35PM +0100, Christian Weisgerber wrote:
> Bug report:
> 
> Start up "tog log", hit 'n'.
> tog is happily searching away for... something.  I guess it's trying
> to match an invalid regex.

Yes, confirmed. How about this?

diff 6e210706a4224007cf266b48c28e5a54e8279589 /home/stsp/src/got
blob - 915bc83532c216505a96c19f3ac75ac031f66b87
file + tog/tog.c
--- tog/tog.c
+++ tog/tog.c
@@ -939,7 +939,7 @@ view_input(struct tog_view **new, int *done, struct to
 		break;
 	case 'N':
 	case 'n':
-		if (view->search_next) {
+		if (view->searching) {
 			view->searching = (ch == 'n' ?
 			    TOG_SEARCH_FORWARD : TOG_SEARCH_BACKWARD);
 			view->search_next_done = 0;