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

[script] #1064 clear view on keep-selection/new-selection.

issue: #1064
This commit is contained in:
Dave Davenport 2022-07-30 15:17:50 +02:00
parent 903def557b
commit 7c7fe729e6
2 changed files with 5 additions and 1 deletions

View file

@ -10,7 +10,7 @@ then
# Override the previously set prompt. # Override the previously set prompt.
echo -en "\0theme\x1felement-text { background-color: "$@";}\n" echo -en "\0theme\x1felement-text { background-color: "$@";}\n"
echo -en "\0keep-selection\x1ftrue\n" echo -en "\0keep-selection\x1ftrue\n"
echo -en "\0new-selection\x1f2\n" # echo -en "\0new-selection\x1f2\n"
echo "red" echo "red"
echo "lightgreen" echo "lightgreen"
echo "lightblue" echo "lightblue"

View file

@ -352,7 +352,11 @@ static ModeMode script_mode_result(Mode *sw, int mretv, char **input,
rmpd->new_selection < rmpd->cmd_list_length) { rmpd->new_selection < rmpd->cmd_list_length) {
rofi_view_set_selected_line(rofi_view_get_active(), rofi_view_set_selected_line(rofi_view_get_active(),
rmpd->new_selection); rmpd->new_selection);
} else {
rofi_view_set_selected_line(rofi_view_get_active(), selected_line);
} }
g_free(*input);
*input = NULL;
retv = RELOAD_DIALOG; retv = RELOAD_DIALOG;
} else { } else {
retv = RESET_DIALOG; retv = RESET_DIALOG;