Rename text_len to input_len - wmenu - 🔧 fork of wmenu
(HTM) git clone git@git.drkhsh.at/wmenu.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit b247119ab3ad46760ac85428309230200d9f6c61
(DIR) parent ff4d1f8f8ee392d52b71858fce658f70ee26f434
(HTM) Author: adnano <me@adnano.co>
Date: Sat, 2 Mar 2024 07:32:43 -0500
Rename text_len to input_len
Diffstat:
M menu.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/menu.c b/menu.c
@@ -223,9 +223,9 @@ static void match_items(struct menu *menu) {
menu->matches_end = NULL;
menu->sel = NULL;
- size_t text_len = strlen(menu->input);
+ size_t input_len = strlen(menu->input);
- /* tokenize text by space for matching the tokens individually */
+ /* tokenize input by space for matching the tokens individually */
strcpy(buf, menu->input);
tok = strtok(buf, " ");
while (tok) {
@@ -253,7 +253,7 @@ static void match_items(struct menu *menu) {
/* not all tokens match */
continue;
}
- if (!tokc || !menu->strncmp(menu->input, item->text, text_len + 1)) {
+ if (!tokc || !menu->strncmp(menu->input, item->text, input_len + 1)) {
append_item(item, &lexact, &exactend);
} else if (!menu->strncmp(tokv[0], item->text, tok_len)) {
append_item(item, &lprefix, &prefixend);