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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: search issues in tog after cursor movement
To:
Omar Polo <op@omarpolo.com>
Cc:
Mikhail <mp39590@gmail.com>, gameoftrees@openbsd.org
Date:
Sat, 18 Jun 2022 18:54:06 +0200

Download raw body.

Thread
On Sat, Jun 18, 2022 at 06:41:31PM +0200, Omar Polo wrote:
> please, wrap nested ifs like these in braces.
> 
> 		if (view->searching == TOG_SEARCH_FORWARD) {
> 			if (...)
> 				...
> 			else
> 				...
> 		} else {
> 			...
> 		}
> 
> while you're code is correct and even without indentation there aren't
> other ways to interpret it, the "dangling else" can be confusing :)

I have committed the original patch and then applied the fix
you suggested. Thanks.