Browse Source

uriel didn't understood dmenu code, he broke nearly everything

master
arg@mmvi 18 years ago
parent
commit
e0fe9f2fca
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      main.c

+ 13
- 2
main.c View File

@ -120,8 +120,19 @@ match(char *pattern) {
nitem = 0;
for(i = allitems; i; i=i->next)
if(plen ? !strncmp(pattern, i->text, plen) :
strncmp(pattern, i->text, plen) && strstr(i->text, pattern)) {
if(!plen || !strncmp(pattern, i->text, plen)) {
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)
item = i;
else


Loading…
Cancel
Save