uriel didn't understood dmenu code, he broke nearly everything
This commit is contained in:
parent
c9465859a6
commit
e0fe9f2fca
15
main.c
15
main.c
@ -120,8 +120,19 @@ match(char *pattern) {
|
|||||||
nitem = 0;
|
nitem = 0;
|
||||||
|
|
||||||
for(i = allitems; i; i=i->next)
|
for(i = allitems; i; i=i->next)
|
||||||
if(plen ? !strncmp(pattern, i->text, plen) :
|
if(!plen || !strncmp(pattern, i->text, plen)) {
|
||||||
strncmp(pattern, i->text, plen) && strstr(i->text, pattern)) {
|
if(!j)
|
||||||
|
item = i;
|
||||||
|
else
|
||||||
|
j->right = i;
|
||||||
|
i->left = j;
|
||||||
|
i->right = NULL;
|
||||||
|
j = i;
|
||||||
|
nitem++;
|
||||||
|
}
|
||||||
|
for(i = allitems; i; i=i->next)
|
||||||
|
if(plen && strncmp(pattern, i->text, plen)
|
||||||
|
&& strstr(i->text, pattern)) {
|
||||||
if(!j)
|
if(!j)
|
||||||
item = i;
|
item = i;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user