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/filtering_menu_panel.go | |
parent | da3b0bf7c8aa6202d5eb9c8178f6648bc695336a (diff) |
refactor prompt opts
Diffstat (limited to 'pkg/gui/filtering_menu_panel.go')
-rw-r--r-- | pkg/gui/filtering_menu_panel.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pkg/gui/filtering_menu_panel.go b/pkg/gui/filtering_menu_panel.go index f79f0ca46..d6872f7e4 100644 --- a/pkg/gui/filtering_menu_panel.go +++ b/pkg/gui/filtering_menu_panel.go @@ -41,9 +41,12 @@ func (gui *Gui) handleCreateFilteringMenuPanel(g *gocui.Gui, v *gocui.View) erro menuItems = append(menuItems, &menuItem{ displayString: gui.Tr.LcFilterPathOption, onPress: func() error { - return gui.prompt(gui.Tr.LcEnterFileName, "", func(response string) error { - gui.State.Modes.Filtering.Path = strings.TrimSpace(response) - return gui.Errors.ErrRestart + return gui.prompt(promptOpts{ + title: gui.Tr.LcEnterFileName, + handleConfirm: func(response string) error { + gui.State.Modes.Filtering.Path = strings.TrimSpace(response) + return gui.Errors.ErrRestart + }, }) }, }) |