From 8c6950635aa3f0ea0da04ccc8894f04c035ba124 Mon Sep 17 00:00:00 2001 From: schubisu Date: Sat, 26 Jun 2021 11:48:53 +0200 Subject: [PATCH] fixed non-exhaustive switch case --- display/display.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) 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 }