Merge pull request #1509 from tlaurion/whiptail_respect_lowercase_uppercase_choices

newt(whiptail): fix code that was doing toupper of input
This commit is contained in:
tlaurion 2023-10-17 13:30:47 -04:00 committed by GitHub
commit f78786705e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,20 @@
--- ./listbox.c.orig 2023-10-11 15:26:20.365000000 -0400
+++ ./listbox.c 2023-10-11 15:27:26.762000000 -0400
@@ -652,7 +652,7 @@
for(i = 0, item = li->boxItems; item != NULL &&
i < li->currItem; i++, item = item->next);
- if (item && item->text && (toupper(*item->text) == toupper(ev.u.key))) {
+ if (item && item->text && *item->text == ev.u.key) {
item = item->next;
i++;
} else {
@@ -660,7 +660,7 @@
i = 0;
}
while (item && item->text &&
- toupper(*item->text) != toupper(ev.u.key)) {
+ *item->text != ev.u.key) {
item = item->next;
i++;
}