mirror of
https://github.com/mintycube/dmenu.git
synced 2024-10-22 12:05:48 +00: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;
|
imax = i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If the command did not give any output at all, then do not clear the existing items */
|
||||||
|
if (!i)
|
||||||
|
return;
|
||||||
|
|
||||||
if (items)
|
if (items)
|
||||||
items[i].text = NULL;
|
items[i].text = NULL;
|
||||||
#if PANGO_PATCH
|
#if PANGO_PATCH
|
||||||
@ -66,4 +71,8 @@ readstream(FILE* stream)
|
|||||||
#endif // PANGO_PATCH
|
#endif // PANGO_PATCH
|
||||||
if (!dynamic || !*dynamic)
|
if (!dynamic || !*dynamic)
|
||||||
lines = MIN(lines, i);
|
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++) {
|
for (i = 0; i < itext_len && (c = it->text[i]); i++) {
|
||||||
/* fuzzy match pattern */
|
/* fuzzy match pattern */
|
||||||
if (!fstrncmp(&text[pidx], &c, 1)) {
|
if (!fstrncmp(&text[pidx], &c, 1)) {
|
||||||
if(sidx == -1)
|
if (sidx == -1)
|
||||||
sidx = i;
|
sidx = i;
|
||||||
pidx++;
|
pidx++;
|
||||||
if (pidx == text_len) {
|
if (pidx == text_len) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user