commit e003d7d29abbe433772645e13c6de9d96023c6f1
Author: fengshaun <amor...@fedoraproject.org>
Date:   Thu Dec 1 02:54:20 2016 -0600

    Add case-insensitive match patch

diff --git a/tools.suckless.org/dmenu/patches/case-insensitive.md 
b/tools.suckless.org/dmenu/patches/case-insensitive.md
new file mode 100644
index 0000000..24b34f2
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/case-insensitive.md
@@ -0,0 +1,18 @@
+case-insensitive
+================
+
+Description
+-----------
+
+This patch adds support for case-insensitive searching to dmenu. This patch
+works on top of fuzzymatch.
+
+Download
+--------
+
+* 
[dmenu-caseinsensitive-20161201-e90b88e.diff](dmenu-caseinsensitive-20161201-e90b88e.diff)
+
+Authors
+------
+
+* fengshaun
diff --git 
a/tools.suckless.org/dmenu/patches/dmenu-caseinsensitive-20161201-e90b88e.diff 
b/tools.suckless.org/dmenu/patches/dmenu-caseinsensitive-20161201-e90b88e.diff
new file mode 100644
index 0000000..1101d02
--- /dev/null
+++ 
b/tools.suckless.org/dmenu/patches/dmenu-caseinsensitive-20161201-e90b88e.diff
@@ -0,0 +1,14 @@
+diff -up dmenu/dmenu.c dmenu-icase/dmenu.c
+--- dmenu/dmenu.c      2016-12-01 02:51:31.642969377 -0600
++++ dmenu-icase/dmenu.c        2016-12-01 02:51:53.889635972 -0600
+@@ -296,8 +296,8 @@ fuzzymatch(void)
+                       sidx = eidx = -1;
+                       /* walk through item text */
+                       for (i = 0; i < itext_len && (c = item->text[i]); i++) {
+-                              /* fuzzy match pattern */
+-                              if (text[pidx] == c) {
++                              /* case-insensitive fuzzy match pattern */
++                              if (tolower(text[pidx]) == c || 
toupper(text[pidx]) == c) {
+                                       if (sidx == -1)
+                                               sidx = i;
+                                       pidx++;


Reply via email to