summaryrefslogtreecommitdiffstats
path: root/pkg/gui/types
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-01-30 12:04:02 +0100
committerStefan Haller <stefan@haller-berlin.de>2024-05-19 07:06:18 +0200
commitda3e0f7147a3400374d643f6d746b0911fc5eaaa (patch)
tree1ccd6f79dab19d9d35dff4bf06ee3361b651a06b /pkg/gui/types
parent269d01233f94631289111cec893c28be2cb0b522 (diff)
Support deleting items from the custom commands history
In the custom commands panel you can now tab to the suggestions and hit 'd' to delete items from there. Useful if you mistyped a command and don't want it to appear in your history any more.
Diffstat (limited to 'pkg/gui/types')
-rw-r--r--pkg/gui/types/common.go20
1 files changed, 11 insertions, 9 deletions
diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go
index 44f07c1e3..39378484b 100644
--- a/pkg/gui/types/common.go
+++ b/pkg/gui/types/common.go
@@ -165,13 +165,14 @@ type CreateMenuOptions struct {
}
type CreatePopupPanelOpts struct {
- HasLoader bool
- Editable bool
- Title string
- Prompt string
- HandleConfirm func() error
- HandleConfirmPrompt func(string) error
- HandleClose func() error
+ HasLoader bool
+ Editable bool
+ Title string
+ Prompt string
+ HandleConfirm func() error
+ HandleConfirmPrompt func(string) error
+ HandleClose func() error
+ HandleDeleteSuggestion func(int) error
FindSuggestionsFunc func(string) []*Suggestion
Mask bool
@@ -193,8 +194,9 @@ type PromptOpts struct {
FindSuggestionsFunc func(string) []*Suggestion
HandleConfirm func(string) error
// CAPTURE THIS
- HandleClose func() error
- Mask bool
+ HandleClose func() error
+ HandleDeleteSuggestion func(int) error
+ Mask bool
}
type MenuSection struct {