From 7a5a9a64fb09d377e0fcda72dfa440422f92392a Mon Sep 17 00:00:00 2001 From: Andrew Gregory Date: Wed, 7 Dec 2016 09:45:01 -0500 Subject: [PATCH] Revert "fix input text matching" This reverts commit a69a065b02c594b79b14ce72b088ab3df2533072. Using strncmp with the length of the user input turns it into a prefix match rather than an exact match as it's supposed to be. --- dmenubar/dmenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmenubar/dmenu.c b/dmenubar/dmenu.c index 1cfefcd..d605ab4 100644 --- a/dmenubar/dmenu.c +++ b/dmenubar/dmenu.c @@ -228,7 +228,7 @@ match(void) len = tokc ? strlen(tokv[0]) : 0; matches = lprefix = lsubstr = matchend = prefixend = substrend = NULL; - textsize = strlen(text); + textsize = strlen(text) + 1; for (item = items; item && item->text; item++) { for (i = 0; i < tokc; i++) if (!fstrstr(item->text, tokv[i]))