| Date: Fri, 1 Sep 2017 15:24:47 +0200
Fix menu input handling in text UI
Also fix a typo introduced in 3eabb27
Diffstat:
M ui_txt.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
--- |
| @@ -172,10 +172,10 @@ uiselectitem(Item *entry)
return NULL;
nitems = dir ? dir->nitems : 0;
- if (!c)
- c = 'h';
for (;;) {
+ if (!c)
+ c = 'h';
printstatus(entry, c);
fflush(stdout);
@@ -244,10 +244,7 @@ uiselectitem(Item *entry)
continue;
}
- if (*buf < '0' || *buf > '9')
- continue;
-
- if (item > 0 && item <= nitems);
+ if (item >= 0 && item <= nitems)
break;
}
|