1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Support -no-levenshtein-sort

This commit is contained in:
QC 2015-04-19 13:19:20 +02:00
parent 6456512695
commit 9bb51a9b35
3 changed files with 13 additions and 2 deletions

View file

@ -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.

View file

@ -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

View file

@ -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 );