Skip to content

Commit

Permalink
[script] #1064 clear view on keep-selection/new-selection.
Browse files Browse the repository at this point in the history
issue: #1064
  • Loading branch information
DaveDavenport committed Jul 30, 2022
1 parent 903def5 commit 7c7fe72
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/test_script_mode_color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ then
# Override the previously set prompt.
echo -en "\0theme\x1felement-text { background-color: "$@";}\n"
echo -en "\0keep-selection\x1ftrue\n"
echo -en "\0new-selection\x1f2\n"
# echo -en "\0new-selection\x1f2\n"
echo "red"
echo "lightgreen"
echo "lightblue"
Expand Down
4 changes: 4 additions & 0 deletions source/modes/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ static ModeMode script_mode_result(Mode *sw, int mretv, char **input,
rmpd->new_selection < rmpd->cmd_list_length) {
rofi_view_set_selected_line(rofi_view_get_active(),
rmpd->new_selection);
} else {
rofi_view_set_selected_line(rofi_view_get_active(), selected_line);
}
g_free(*input);
*input = NULL;
retv = RELOAD_DIALOG;
} else {
retv = RESET_DIALOG;
Expand Down

0 comments on commit 7c7fe72

Please sign in to comment.