mirror of
https://github.com/davatorium/rofi.git
synced 2025-02-03 15:34:54 -05:00
First fix for #164
This commit is contained in:
parent
bc79ae1a1a
commit
300234611d
1 changed files with 14 additions and 0 deletions
|
@ -221,6 +221,20 @@ int dmenu_switcher_dialog ( char **input )
|
|||
}
|
||||
find_arg_str_alloc ( "-filter", input );
|
||||
|
||||
char *select = NULL;
|
||||
find_arg_str ( "-select", &select );
|
||||
if ( select != NULL && find_arg ( "-filter" ) >= 0 ) {
|
||||
char **tokens = tokenize ( select, config.case_sensitive );
|
||||
int i = 0;
|
||||
for ( i = 0; i < length; i++ ) {
|
||||
if ( token_match ( tokens, list[i], config.case_sensitive, 0, NULL ) ) {
|
||||
selected_line = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
g_strfreev ( tokens );
|
||||
}
|
||||
|
||||
do {
|
||||
int next_pos = selected_line;
|
||||
int mretv = menu ( list, length, input, dmenu_prompt,
|
||||
|
|
Loading…
Add table
Reference in a new issue