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

[DRun] Do not run custom command in drun mode.

Fixes: #966
This commit is contained in:
Dave Davenport 2019-08-09 20:08:41 +02:00
parent a42e9f869f
commit 204008d389

View file

@ -735,8 +735,6 @@ static ModeMode drun_mode_result ( Mode *sw, int mretv, char **input, unsigned i
DRunModePrivateData *rmpd = (DRunModePrivateData *) mode_get_private_data ( sw );
ModeMode retv = MODE_EXIT;
gboolean run_in_term = ( ( mretv & MENU_CUSTOM_ACTION ) == MENU_CUSTOM_ACTION );
if ( mretv & MENU_NEXT ) {
retv = NEXT_DIALOG;
}
@ -750,9 +748,7 @@ static ModeMode drun_mode_result ( Mode *sw, int mretv, char **input, unsigned i
exec_cmd_entry ( &( rmpd->entry_list[selected_line] ) );
}
else if ( ( mretv & MENU_CUSTOM_INPUT ) && *input != NULL && *input[0] != '\0' ) {
RofiHelperExecuteContext context = { .name = NULL };
// FIXME: We assume startup notification in terminals, not in others
helper_execute_command ( NULL, *input, run_in_term, run_in_term ? &context : NULL );
retv = RELOAD_DIALOG;
}
else if ( ( mretv & MENU_ENTRY_DELETE ) && selected_line < rmpd->cmd_list_length ) {
// Possitive sort index means it is in history.