diff options
author | Phil Jones <philj56@gmail.com> | 2023-04-17 23:43:05 +0100 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2023-04-17 23:43:05 +0100 |
commit | 574eff0df1aff9bdc6d32939a03312cc08803de3 (patch) | |
tree | 5aeca72f70314bee3bf95db99f10d89f0a7b4032 /src/tofi.h | |
parent | 71a4801d20d8904cfcfa5e92c96d53ee06a2c69f (diff) |
Add --matching-algorithm option.
This replaces the --fuzzy-match algorithm. Available choices are normal,
prefix and fuzzy. Levenshtein distance was investigated, but it seems
pretty rubbish for tofi's use case, where you normally want a good match when
you've only typed a small portion of the target string.
Diffstat (limited to 'src/tofi.h')
-rw-r--r-- | src/tofi.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -8,6 +8,7 @@ #include "clipboard.h" #include "color.h" #include "entry.h" +#include "matching.h" #include "surface.h" #include "wlr-layer-shell-unstable-v1.h" #include "fractional-scale-v1.h" @@ -90,6 +91,7 @@ struct tofi { /* Options */ uint32_t anchor; + enum matching_algorithm matching_algorithm; bool ascii_input; bool hide_cursor; bool use_history; @@ -97,7 +99,6 @@ struct tofi { bool late_keyboard_init; bool drun_launch; bool drun_print_exec; - bool fuzzy_match; bool require_match; bool auto_accept_single; bool multiple_instance; |