diff options
author | Dave Davenport <qball@gmpclient.org> | 2017-01-11 09:42:37 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2017-01-11 09:42:37 +0100 |
commit | 19b023b221b03a0e322696be8234170ab90984ec (patch) | |
tree | 0ce99991f275406ebb065c4f844bca9be34cd527 /include | |
parent | 4452b08288c25fa833e22c97b57045ec5888b547 (diff) |
Split sorting option. one for sorting. One to force levenshtein.
Diffstat (limited to 'include')
-rw-r--r-- | include/helper.h | 4 | ||||
-rw-r--r-- | include/settings.h | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/include/helper.h b/include/helper.h index d580c4df..01799967 100644 --- a/include/helper.h +++ b/include/helper.h @@ -167,13 +167,15 @@ char *rofi_expand_path ( const char *input ); /** * @param needle The string to find match weight off + * @param needlelen The length of the needle * @param haystack The string to match against + * @param haystacklen The length of the haystack * * UTF-8 aware levenshtein distance calculation * * @returns the levenshtein distance between needle and haystack */ -unsigned int levenshtein ( const char *needle, const char *haystack ); +unsigned int levenshtein ( const char *needle, const glong needlelen, const char *haystack, const glong haystacklen ); /** * @param data the unvalidated character array holding possible UTF-8 data diff --git a/include/settings.h b/include/settings.h index 344208e2..90e0be08 100644 --- a/include/settings.h +++ b/include/settings.h @@ -98,6 +98,8 @@ typedef struct unsigned int fixed_num_lines; /** Do not use history */ unsigned int disable_history; + /** Toggle to enable sorting. */ + unsigned int sort; /** Use levenshtein sorting when matching */ unsigned int levenshtein_sort; /** Search case sensitivity */ |