| Date: Sun, 27 Mar 2022 13:28:02 +0200
ui_ti: refactor DEC function key handling a bit for an upcoming commit
No functional change intended.
Diffstat:
M ui_ti.c | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
--- |
| @@ -424,7 +424,7 @@ uiselectitem(Item *entry)
{
Dir *dir;
char *searchstr = NULL;
- int plines = lines-2;
+ int c, plines = lines-2;
if (!entry || !(dir = entry->dat))
return NULL;
@@ -441,19 +441,21 @@ uiselectitem(Item *entry)
default:
continue;
}
- switch (getchar()) {
+ c = getchar();
+ switch (c) {
case '4':
- if (getchar() != '~')
- continue;
- goto end;
case '5':
- if (getchar() != '~')
- continue;
- goto pgup;
case '6':
if (getchar() != '~')
continue;
- goto pgdown;
+ switch (c) {
+ case '4':
+ goto end;
+ case '5':
+ goto pgup;
+ case '6':
+ goto pgdown;
+ }
case 'A':
goto lnup;
case 'B': |