Skip to content

Commit

Permalink
Add KeyEsc binding for ArgumentsInputWide and FileView
Browse files Browse the repository at this point in the history
  • Loading branch information
paololazzari committed Oct 22, 2023
1 parent 8811c5f commit 60f355d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
8 changes: 8 additions & 0 deletions src/ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down Expand Up @@ -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
})
}
Expand Down

0 comments on commit 60f355d

Please sign in to comment.