Commit Diff


commit - 6514b07ad24e9066252c418cdec1d6ccae570cf6
commit + 2e898a308ff4c668220a6832e15d0d30424bf85a
blob - a4fca09c9bd8edbd3ab8aae524885ed865381f7a
blob + dea227e6d97775e41c19074d6d2a874a2544d92d
--- dmenu.c
+++ dmenu.c
@@ -507,20 +507,16 @@ match(char *pattern) {
 	nitem = 0;
 	for(i = allitems; i; i=i->next)
 		i->matched = False;
-
 	for(i = allitems; i; i = i->next)
 		if(!i->matched && !strncasecmp(pattern, i->text, plen))
 			j = appenditem(i, j);
-
-	for (i = allitems; i; i = i->next)
+	for(i = allitems; i; i = i->next)
 		if(!i->matched && strcasestr(i->text, pattern))
 			j = appenditem(i, j);
-
 	if(idomatch)
-		for (i = allitems; i; i = i->next)
+		for(i = allitems; i; i = i->next)
 			if(!i->matched && strcaseido(i->text, pattern))
 				j = appenditem(i, j);
-
 	curr = prev = next = sel = item;
 	calcoffsets();
 }