diff options
| author | arg@mmvi <unknown> | 2006-09-26 08:47:10 +0200 | 
|---|---|---|
| committer | arg@mmvi <unknown> | 2006-09-26 08:47:10 +0200 | 
| commit | e0fe9f2fcac32f04f7fda5236f48d1a705cbdcce (patch) | |
| tree | a0280f5ac347c43ab923f4b6cc8d493a580a20ad | |
| parent | c9465859a6eac7763d0b9049dca6bd34c163d8f6 (diff) | |
uriel didn't understood dmenu code, he broke nearly everything
| -rw-r--r-- | main.c | 15 | 
1 files changed, 13 insertions, 2 deletions
| @@ -120,8 +120,19 @@ match(char *pattern) { | |||
| 120 | nitem = 0; | 120 | nitem = 0; | 
| 121 | 121 | ||
| 122 | for(i = allitems; i; i=i->next) | 122 | for(i = allitems; i; i=i->next) | 
| 123 | if(plen ? !strncmp(pattern, i->text, plen) : | 123 | if(!plen || !strncmp(pattern, i->text, plen)) { | 
| 124 | strncmp(pattern, i->text, plen) && strstr(i->text, pattern)) { | 124 | if(!j) | 
| 125 | item = i; | ||
| 126 | else | ||
| 127 | j->right = i; | ||
| 128 | i->left = j; | ||
| 129 | i->right = NULL; | ||
| 130 | j = i; | ||
| 131 | nitem++; | ||
| 132 | } | ||
| 133 | for(i = allitems; i; i=i->next) | ||
| 134 | if(plen && strncmp(pattern, i->text, plen) | ||
| 135 | && strstr(i->text, pattern)) { | ||
| 125 | if(!j) | 136 | if(!j) | 
| 126 | item = i; | 137 | item = i; | 
| 127 | else | 138 | else | 
