Inverse logic in TI uiselectitem on non-match - sacc - sacc(omys), simple console gopher client
git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
Log
Files
Refs
Tags
LICENSE
---
commit 7ab95c658cf1dd546ec39603851742db65233204
parent 904cd0f37ae4028597cb85cb08190e998dfac62b
Author: Quentin Rameau 
Date:   Fri, 11 Oct 2019 17:17:49 +0200

Inverse logic in TI uiselectitem on non-match

Diffstat:
  M ui_ti.c                             |      11 +++++------

1 file changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/ui_ti.c b/ui_ti.c
@@ -516,13 +516,12 @@ uiselectitem(Item *entry)
                 case _key_search:
                 search:
                         free(searchstr);
-                        if ((searchstr = uiprompt("Search for: ")) &&
-                            searchstr[0])
-                                goto searchnext;
-                        clear(&searchstr);
-                        continue;
+                        if (!((searchstr = uiprompt("Search for: ")) &&
+                            searchstr[0])) {
+                                clear(&searchstr);
+                                continue;
+                        }
                 case _key_searchnext:
-                searchnext:
                         searchinline(searchstr, entry, +1);
                         continue;
                 case _key_searchprev: