summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/main.c b/main.c
index 77a61b9..170a3e0 100644
--- a/main.c
+++ b/main.c
@@ -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
ommit/.hgtags?id=c023780eda974065ae5926a072f650bc3223f9be&follow=1'>Added tag 0.1.1 for changeset 3ef997607115Gravatar Enno Boland (tox) 1-0/+1 2009-09-10bugfix releaseGravatar Enno Boland (tox) 1-1/+1 2009-09-10removing unneeded background color.Gravatar Enno Boland (tox) 1-1/+0 2009-09-10rearranging some source.Gravatar Enno Boland (tox) 1-12/+19 2009-09-10adding user stylesheets.Gravatar Enno Boland (tox) 1-10/+21 2009-09-10Added tag 0.1 for changeset 9c8ebcf54061Gravatar Enno Boland (tox) 1-0/+2 2009-09-10dist doesn't work. fixing Makefile.Gravatar Enno Boland (tox) 1-1/+1