mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 14:05:48 +02:00
dynamic options vs fuzzymatch and prefix completion patches fix ref. #8
This commit is contained in:
parent
e3a291ea43
commit
ea2fd892db
@ -57,6 +57,11 @@ readstream(FILE* stream)
|
||||
imax = i;
|
||||
}
|
||||
}
|
||||
|
||||
/* If the command did not give any output at all, then do not clear the existing items */
|
||||
if (!i)
|
||||
return;
|
||||
|
||||
if (items)
|
||||
items[i].text = NULL;
|
||||
#if PANGO_PATCH
|
||||
@ -66,4 +71,8 @@ readstream(FILE* stream)
|
||||
#endif // PANGO_PATCH
|
||||
if (!dynamic || !*dynamic)
|
||||
lines = MIN(lines, i);
|
||||
else {
|
||||
text[0] = '\0';
|
||||
cursor = 0;
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ fuzzymatch(void)
|
||||
for (i = 0; i < itext_len && (c = it->text[i]); i++) {
|
||||
/* fuzzy match pattern */
|
||||
if (!fstrncmp(&text[pidx], &c, 1)) {
|
||||
if(sidx == -1)
|
||||
if (sidx == -1)
|
||||
sidx = i;
|
||||
pidx++;
|
||||
if (pidx == text_len) {
|
||||
|
Loading…
Reference in New Issue
Block a user