summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2020-03-29 12:56:47 +0200
committerDave Davenport <qball@gmpclient.org>2020-03-29 12:56:47 +0200
commitd8a0f540f099dd44bdaf753ec2e3d526e3487b73 (patch)
tree63e4a3d39b9be309916c5445877150d38d36e2c6
parent1e4409c6b3add5482f976a3bb9c610bc8f1d602d (diff)
Add selected-row option to normal operation.
-rw-r--r--source/rofi.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/rofi.c b/source/rofi.c
index a9b5150a..9425738b 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -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 );
}