diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-04-27 22:18:57 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-05-19 07:06:18 +0200 |
commit | a7041cf492cb24bfd2bbaed0df5d91a943b78ca0 (patch) | |
tree | 484bd01ba98cd050fafdab9af070b0cba726fe1c /pkg/gui/types | |
parent | da3e0f7147a3400374d643f6d746b0911fc5eaaa (diff) |
Allow editing a custom command from the suggestions list by pressing 'e'
For custom commands it is useful to select an earlier command and have it copied
to the prompt for further editing. This can be done by hitting 'e' now.
For other types of suggestion panels we don't enable this behavior, as you can't
create arbitrary new items there that don't already exist as a suggestion.
Diffstat (limited to 'pkg/gui/types')
-rw-r--r-- | pkg/gui/types/common.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index 39378484b..d50173078 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -176,6 +176,7 @@ type CreatePopupPanelOpts struct { FindSuggestionsFunc func(string) []*Suggestion Mask bool + AllowEditSuggestion bool } type ConfirmOpts struct { @@ -193,6 +194,7 @@ type PromptOpts struct { InitialContent string FindSuggestionsFunc func(string) []*Suggestion HandleConfirm func(string) error + AllowEditSuggestion bool // CAPTURE THIS HandleClose func() error HandleDeleteSuggestion func(int) error |