uriel didn't understood dmenu code, he broke nearly everything
arg@mmvi unknown
Tue, 26 Sep 2006 08:47:10 +0200
1 files changed,
13 insertions(+),
2 deletions(-)
jump to
M
main.c
→
main.c
@@ -120,8 +120,19 @@ item = j = NULL;
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