fixed non-exhaustive switch case

This commit is contained in:
schubisu 2021-06-26 11:48:53 +02:00
parent 2c5d984759
commit 8c6950635a

View File

@ -397,13 +397,12 @@ func Init(version, commit, builtBy string) {
tabs[curTab].view.ScrollToHighlight() tabs[curTab].view.ScrollToHighlight()
return nil return nil
case config.CmdInvalid: case config.CmdInvalid:
return nil if event.Key() == tcell.KeyEsc {
} tabs[curTab].mode = tabModeDone
if event.Key() == tcell.KeyEsc { tabs[curTab].view.SetBytes(originalText)
tabs[curTab].mode = tabModeDone layout.RemoveItem(searchBar)
tabs[curTab].view.SetBytes(originalText) return nil
layout.RemoveItem(searchBar) }
return nil
} }
return event return event
} }