diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-28 13:35:58 +1100 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-11-28 20:48:17 +1100 |
commit | 5671ec5f5867c3c2b083563bac309c8616b322ae (patch) | |
tree | f0cd4ed218be9a4a87b9e60782a2fc97ba2d81cb /pkg/gui/custom_commands.go | |
parent | da3b0bf7c8aa6202d5eb9c8178f6648bc695336a (diff) |
refactor prompt opts
Diffstat (limited to 'pkg/gui/custom_commands.go')
-rw-r--r-- | pkg/gui/custom_commands.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/gui/custom_commands.go b/pkg/gui/custom_commands.go index 0d5179006..6b86b07fd 100644 --- a/pkg/gui/custom_commands.go +++ b/pkg/gui/custom_commands.go @@ -98,15 +98,15 @@ func (gui *Gui) handleCustomCommandKeybinding(customCommand config.CustomCommand return gui.surfaceError(err) } - return gui.prompt( - title, - initialValue, - func(str string) error { + return gui.prompt(promptOpts{ + title: title, + initialContent: initialValue, + handleConfirm: func(str string) error { promptResponses[idx] = str return wrappedF() }, - ) + }) } case "menu": f = func() error { |