diff --git a/doc/rofi-manpage.markdown b/doc/rofi-manpage.markdown index 168f6491..1f86e292 100644 --- a/doc/rofi-manpage.markdown +++ b/doc/rofi-manpage.markdown @@ -419,10 +419,12 @@ The following options are further explained in the theming section: ### History and Sorting `-disable-history` +`-no-disable-history` (re-enable history) Disable history -`-levenshtein-sort` +`-levenshtein-sort` to enable +`-no-levenshtein-sort` to disable When searching sort the result based on levenshtein distance. diff --git a/doc/rofi.1 b/doc/rofi.1 index bb7decd2..5a0913a3 100644 --- a/doc/rofi.1 +++ b/doc/rofi.1 @@ -526,10 +526,12 @@ To get one merge view, of window,run,ssh: .SS History and Sorting .PP \fB\fC\-disable\-history\fR +\fB\fC\-no\-disable\-history\fR (re\-enable history) .IP Disable history .PP -\fB\fC\-levenshtein\-sort\fR +\fB\fC\-levenshtein\-sort\fR to enable +\fB\fC\-no\-levenshtein\-sort\fR to disable .IP When searching sort the result based on levenshtein distance. .SS Dmenu specific diff --git a/source/xrmoptions.c b/source/xrmoptions.c index 0dd57a15..e3bdcdc2 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -237,6 +237,13 @@ static void config_parse_cmd_option ( XrmOption *option ) if ( find_arg ( key ) >= 0 ) { *( option->value.num ) = TRUE; } + else { + g_free ( key ); + key = g_strdup_printf ( "-no-%s", option->name ); + if ( find_arg ( key ) >= 0 ) { + *( option->value.num ) = FALSE; + } + } break; case xrm_Char: find_arg_char ( key, option->value.charc );