mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
Addressing prefixcompletion vs fuzzymatch compatibility issue ref. #5
This commit is contained in:
parent
310bfe4e02
commit
328a60e0d3
9
dmenu.c
9
dmenu.c
@ -1248,7 +1248,14 @@ insert:
|
||||
break;
|
||||
case XK_Tab:
|
||||
#if PREFIXCOMPLETION_PATCH
|
||||
if (!matches) break; /* cannot complete no matches */
|
||||
if (!matches)
|
||||
break; /* cannot complete no matches */
|
||||
#if FUZZYMATCH_PATCH
|
||||
/* only do tab completion if all matches start with prefix */
|
||||
for (item = matches; item && item->text; item = item->right)
|
||||
if (item->text[0] != text[0])
|
||||
goto draw;
|
||||
#endif // FUZZYMATCH_PATCH
|
||||
strncpy(text, matches->text, sizeof text - 1);
|
||||
text[sizeof text - 1] = '\0';
|
||||
len = cursor = strlen(text); /* length of longest common prefix */
|
||||
|
Loading…
Reference in New Issue
Block a user