diff --git a/pkg/gui/controllers/quit_actions.go b/pkg/gui/controllers/quit_actions.go index 2775a92a6..381828c1f 100644 --- a/pkg/gui/controllers/quit_actions.go +++ b/pkg/gui/controllers/quit_actions.go @@ -58,17 +58,12 @@ func (self *QuitActions) Escape() error { } } - switch ctx := currentContext.(type) { - case types.IFilterableContext: + // Cancelling searching (as opposed to filtering) is handled by gocui + if ctx, ok := currentContext.(types.IFilterableContext); ok { if ctx.IsFiltering() { self.c.Helpers().Search.Cancel() return nil } - case types.ISearchableContext: - if ctx.IsSearching() { - self.c.Helpers().Search.Cancel() - return nil - } } parentContext := currentContext.GetParentContext()