mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Add selected-row option to normal operation.
This commit is contained in:
parent
1e4409c6b3
commit
d8a0f540f0
1 changed files with 7 additions and 0 deletions
|
@ -191,6 +191,13 @@ static void run_switcher ( ModeMode mode )
|
|||
}
|
||||
curr_switcher = mode;
|
||||
RofiViewState * state = rofi_view_create ( modi[mode], config.filter, 0, process_result );
|
||||
|
||||
// User can pre-select a row.
|
||||
if ( find_arg ( "-selected-row" ) >= 0 ){
|
||||
unsigned int sr = 0;
|
||||
find_arg_uint ( "-selected-row", &(sr) );
|
||||
rofi_view_set_selected_line ( state, sr );
|
||||
}
|
||||
if ( state ) {
|
||||
rofi_view_set_active ( state );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue