@@ -8,5 +8,4 @@
|
|||||||
|
|
||||||
### Patches
|
### Patches
|
||||||
|
|
||||||
* [fuzzymatch](https://tools.suckless.org/dmenu/patches/fuzzymatch/)
|
* [Fuzzymatch](https://tools.suckless.org/dmenu/patches/fuzzymatch/)
|
||||||
* [case-insensitive](https://tools.suckless.org/dmenu/patches/case-insensitive/)
|
|
||||||
|
11
dmenu.c
11
dmenu.c
@@ -56,9 +56,8 @@ static Clr *scheme[SchemeLast];
|
|||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
static char * cistrstr(const char *s, const char *sub);
|
static int (*fstrncmp)(const char *, const char *, size_t) = strncmp;
|
||||||
static int (*fstrncmp)(const char *, const char *, size_t) = strncasecmp;
|
static char *(*fstrstr)(const char *, const char *) = strstr;
|
||||||
static char *(*fstrstr)(const char *, const char *) = cistrstr;
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
textw_clamp(const char *str, unsigned int n)
|
textw_clamp(const char *str, unsigned int n)
|
||||||
@@ -822,9 +821,9 @@ main(int argc, char *argv[])
|
|||||||
fuzzy = 0;
|
fuzzy = 0;
|
||||||
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
|
else if (!strcmp(argv[i], "-f")) /* grabs keyboard before reading stdin */
|
||||||
fast = 1;
|
fast = 1;
|
||||||
else if (!strcmp(argv[i], "-s")) { /* case-sensitive item matching */
|
else if (!strcmp(argv[i], "-i")) { /* case-insensitive item matching */
|
||||||
fstrncmp = strncmp;
|
fstrncmp = strncasecmp;
|
||||||
fstrstr = strstr;
|
fstrstr = cistrstr;
|
||||||
} else if (i + 1 == argc)
|
} else if (i + 1 == argc)
|
||||||
usage();
|
usage();
|
||||||
/* these options take one argument */
|
/* these options take one argument */
|
||||||
|
Reference in New Issue
Block a user