From 60f355d4bb78ec9e94202552268e5be8d084a57f Mon Sep 17 00:00:00 2001 From: Paolo Lazzari Date: Sun, 22 Oct 2023 12:39:52 +0200 Subject: [PATCH] Add KeyEsc binding for ArgumentsInputWide and FileView --- cmd/core.go | 2 +- src/ui/ui.go | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/cmd/core.go b/cmd/core.go index 1d98537..5abf4ff 100644 --- a/cmd/core.go +++ b/cmd/core.go @@ -13,7 +13,7 @@ import ( "golang.org/x/term" ) -const version = "0.2.2" +const version = "0.2.3" func completionCommand() *cobra.Command { return &cobra.Command{ diff --git a/src/ui/ui.go b/src/ui/ui.go index 9ce27b3..193d8d4 100644 --- a/src/ui/ui.go +++ b/src/ui/ui.go @@ -369,6 +369,10 @@ func (ui *UI) configArgumentsInputWide() { ui.App.SetRoot(ui.Flex, true). SetFocus(ui.ArgumentsInput) ui.ArgumentsInput.SetText(ui.ArgumentsInputWide.GetText()) + case tcell.KeyEsc: + ui.App.SetRoot(ui.Flex, true). + SetFocus(ui.ArgumentsInput) + ui.ArgumentsInput.SetText(ui.ArgumentsInputWide.GetText()) } return event }) @@ -485,7 +489,11 @@ func (ui *UI) configFileView() { case tcell.KeyCtrlO: ui.App.SetRoot(ui.Flex, true). SetFocus(ui.FileOptionsTreeView) + case tcell.KeyEsc: + ui.App.SetRoot(ui.Flex, true). + SetFocus(ui.FileOptionsTreeView) } + return event }) }