From 0af439ddf5b43cce197ee9da8ed3361c9483c5f3 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Tue, 12 Aug 2025 18:08:27 +0200 Subject: [PATCH] Cleanup: remove dead code Cancelling searching (as opposed to filtering) is handled by gocui. --- pkg/gui/controllers/quit_actions.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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()