From 574eff0df1aff9bdc6d32939a03312cc08803de3 Mon Sep 17 00:00:00 2001 From: Phil Jones Date: Mon, 17 Apr 2023 23:43:05 +0100 Subject: 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. --- test/config.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'test/config.c') diff --git a/test/config.c b/test/config.c index 79f90e5..c15d66d 100644 --- a/test/config.c +++ b/test/config.c @@ -45,6 +45,12 @@ int main(int argc, char *argv[]) is_valid("text-cursor-style", "underscore", "Text cursor underscore"); isnt_valid("text-cursor-style", "blocky", "Invalid text cursor style"); + /* Matching algorithms */ + is_valid("matching-algorithm", "normal", "Normal matching"); + is_valid("matching-algorithm", "fuzzy", "Fuzzy matching"); + is_valid("matching-algorithm", "prefix", "Prefix matching"); + isnt_valid("matching-algorithm", "regex", "Regex matching"); + /* Bools */ is_valid("horizontal", "tRuE", "Boolean true"); is_valid("horizontal", "fAlSe", "Boolean false"); -- cgit v1.2.3