diff --git a/doc/rofi-script.5.markdown b/doc/rofi-script.5.markdown index aeeac8fda..9d5d41c38 100644 --- a/doc/rofi-script.5.markdown +++ b/doc/rofi-script.5.markdown @@ -59,6 +59,7 @@ An integer number with the current state: - **0**: Initial call of script. - **1**: Selected an entry. - **2**: Selected a custom entry. +- **3**: Deleted an entry. - **10-28**: Custom keybinding 1-19 ( need to be explicitly enabled by script ). ### `ROFI_INFO` @@ -109,7 +110,7 @@ The following extra options exists: - **keep-selection**: If set, the selection is not moved to the first entry, but the current position is maintained. The filter is cleared. -- **keep-filter**: If set, the filter is not cleared. +- **keep-filter**: If set, the filter is not cleared. - **new-selection**: If `keep-selection` is set, this allows you to override the selected entry (absolute position). diff --git a/source/modes/script.c b/source/modes/script.c index 6ca29813e..36bbb7570 100644 --- a/source/modes/script.c +++ b/source/modes/script.c @@ -348,6 +348,10 @@ static ModeMode script_mode_result(Mode *sw, int mretv, char **input, retv = (mretv & MENU_LOWER_MASK); return retv; } + } else if ((mretv & MENU_ENTRY_DELETE) && selected_line != UINT32_MAX) { + script_mode_reset_highlight(sw); + new_list = execute_executor(sw, rmpd->cmd_list[selected_line].entry, &new_length, + 3, &(rmpd->cmd_list[selected_line])); } else if ((mretv & MENU_OK) && rmpd->cmd_list[selected_line].entry != NULL) { if (rmpd->cmd_list[selected_line].nonselectable) { return RELOAD_DIALOG;