diff --git a/display/display.go b/display/display.go index 5729aa9..bf4b7ca 100644 --- a/display/display.go +++ b/display/display.go @@ -397,13 +397,12 @@ func Init(version, commit, builtBy string) { tabs[curTab].view.ScrollToHighlight() return nil case config.CmdInvalid: - return nil - } - if event.Key() == tcell.KeyEsc { - tabs[curTab].mode = tabModeDone - tabs[curTab].view.SetBytes(originalText) - layout.RemoveItem(searchBar) - return nil + if event.Key() == tcell.KeyEsc { + tabs[curTab].mode = tabModeDone + tabs[curTab].view.SetBytes(originalText) + layout.RemoveItem(searchBar) + return nil + } } return event }