[wiki] [sites] add fuzzymatch patch || Jan Christoph Ebersbach
commit a1a70a3418292922c8f32f0a5a0df0f85719ed36
Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
Date: Tue Jan 27 19:42:34 2015 +0100
add fuzzymatch patch
diff --git a/tools.suckless.org/dmenu/patches/dmenu-4.5-fuzzymatch.diff b/tools.suckless.org/dmenu/patches/dmenu-4.5-fuzzymatch.diff
new file mode 100644
index 0000000..ad2eed3
--- /dev/null
+++ b/tools.suckless.org/dmenu/patches/dmenu-4.5-fuzzymatch.diff
_AT_@ -0,0 +1,143 @@
+Author: Jan Christoph Ebersbach <jceb_AT_e-jc.de>
+URL: no url in suckless wiki yet
+Add add fuzzy matching to dmenu
+
+Index: dmenu-patches/dmenu/dmenu.c
+===================================================================
+--- dmenu-patches.orig/dmenu/dmenu.c
++++ dmenu-patches/dmenu/dmenu.c
+_AT_@ -22,12 +22,14 @@ typedef struct Item Item;
+ struct Item {
+ char *text;
+ Item *left, *right;
++ int distance;
+ };
+
+ static void appenditem(Item *item, Item **list, Item **last);
+ static void calcoffsets(void);
+ static char *cistrstr(const char *s, const char *sub);
+ static void drawmenu(void);
++static void fuzzymatch(void);
+ static void grabkeyboard(void);
+ static void insert(const char *str, ssize_t n);
+ static void keypress(XKeyEvent *ev);
+_AT_@ -230,7 +232,7 @@ insert(const char *str, ssize_t n) {
+ if(n > 0)
+ memcpy(&text[cursor], str, n);
+ cursor += n;
+- match();
++ fuzzymatch();
+ }
+
+ void
+_AT_@ -260,7 +262,7 @@ keypress(XKeyEvent *ev) {
+
+ case XK_k: /* delete right */
+ text[cursor] = '
Received on Tue Jan 27 2015 - 19:41:54 CET
This archive was generated by hypermail 2.3.0
: Thu Jun 18 2015 - 17:40:04 CEST