diff options
Diffstat (limited to 'source/helper.c')
-rw-r--r-- | source/helper.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/helper.c b/source/helper.c index 55e688db..52922912 100644 --- a/source/helper.c +++ b/source/helper.c @@ -578,6 +578,22 @@ int config_sanity_check ( void ) GString *msg = g_string_new ( "<big><b>The configuration failed to validate:</b></big>\n" ); + if ( config.sorting_method ) { + if ( g_strcmp0 ( config.sorting_method, "normal" ) == 0 ) { + config.sorting_method_enum = SORT_NORMAL; + } + else if ( g_strcmp0 ( config.sorting_method, "levenshtein" ) == 0 ) { + config.sorting_method_enum = SORT_NORMAL; + } + else if ( g_strcmp0 ( config.sorting_method, "fzf" ) == 0 ) { + config.sorting_method_enum = SORT_FZF; + } else { + g_string_append_printf ( msg, "\t<b>config.sorting_method</b>=%s is not a valid sorting strategy.\nValid options are: normal or fzf.\n", + config.sorting_method ); + found_error = 1; + } + } + if ( config.matching ) { if ( g_strcmp0 ( config.matching, "regex" ) == 0 ) { config.matching_method = MM_REGEX; |