summaryrefslogtreecommitdiffstats
path: root/source/rofi.c
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2021-06-01 13:14:45 +0200
committerDave Davenport <qball@gmpclient.org>2021-06-01 13:14:45 +0200
commit2eefd9b191ee02c78bef11c6fa4575e48e1d372d (patch)
tree2adce80970216e4acf51ec7b9dcc89dc61b93fc4 /source/rofi.c
parent3598ebe60377abf2abd7fd787d61f79c0ddd58b4 (diff)
[Run] Allow (Ctrl-L) to complete files using file-browser.
Merge old setup from #1116 issue: #1116 #659
Diffstat (limited to 'source/rofi.c')
-rw-r--r--source/rofi.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/rofi.c b/source/rofi.c
index 9727f9d2..81f3e789 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -211,6 +211,16 @@ void process_result ( RofiViewState *state )
MenuReturn mretv = rofi_view_get_return_value ( state );
char *input = g_strdup ( rofi_view_get_user_input ( state ) );
ModeMode retv = mode_result ( sw, mretv, &input, selected_line );
+ {
+ if ( state->text ){
+ if ( input == NULL ) {
+ textbox_text ( state->text, "" );
+ } else if ( strcmp ( rofi_view_get_user_input ( state ), input ) != 0 ) {
+ textbox_text ( state->text, input );
+ textbox_cursor_end ( state->text );
+ }
+ }
+ }
g_free ( input );
ModeMode mode = curr_switcher;