Add togglefuzzy function

This commit is contained in:
Jacob 2023-07-22 19:13:02 +02:00
parent 79967d9ad4
commit ed6b1ff309
4 changed files with 11 additions and 0 deletions

View file

@ -1021,6 +1021,8 @@ bind:
- Toggle mode - Toggle mode
- `toggleregex` - `toggleregex`
- Toggle regex mode - Toggle regex mode
- `togglefuzzy`
- Toggle fuzzy matching
- `toggleimg` - `toggleimg`
- Toggle images - Toggle images
- `flipimg` - `flipimg`

View file

@ -520,6 +520,13 @@ void toggleregex(Arg *arg) {
#endif #endif
} }
void togglefuzzy(Arg *arg) {
fuzzy = !fuzzy;
match();
drawmenu();
}
void toggleimg(Arg *arg) { void toggleimg(Arg *arg) {
#if USEIMAGE #if USEIMAGE

View file

@ -72,6 +72,7 @@ static void togglematchcount(Arg *arg);
static void togglemode(Arg *arg); static void togglemode(Arg *arg);
static void togglehighlight(Arg *arg); static void togglehighlight(Arg *arg);
static void toggleregex(Arg *arg); static void toggleregex(Arg *arg);
static void togglefuzzy(Arg *arg);
static void toggleimg(Arg *arg); static void toggleimg(Arg *arg);
/* hover */ /* hover */

View file

@ -390,6 +390,7 @@ static FuncList fl[] = {
{ "togglematchcount", togglematchcount }, { "togglematchcount", togglematchcount },
{ "togglemode", togglemode }, { "togglemode", togglemode },
{ "toggleregex", toggleregex }, { "toggleregex", toggleregex },
{ "togglefuzzy", togglefuzzy },
{ "toggleimg", toggleimg }, { "toggleimg", toggleimg },
{ "setprofile", setprofile }, { "setprofile", setprofile },
{ "setlineheight", setlineheight }, { "setlineheight", setlineheight },