Skip to content

Commit 7de5077

Browse files
committed
Cleanup: remove dead code
Cancelling searching (as opposed to filtering) is handled by gocui.
1 parent 1fdaf80 commit 7de5077

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

pkg/gui/controllers/quit_actions.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,12 @@ func (self *QuitActions) Escape() error {
5858
}
5959
}
6060

61-
switch ctx := currentContext.(type) {
62-
case types.IFilterableContext:
61+
// Cancelling searching (as opposed to filtering) is handled by gocui
62+
if ctx, ok := currentContext.(types.IFilterableContext); ok {
6363
if ctx.IsFiltering() {
6464
self.c.Helpers().Search.Cancel()
6565
return nil
6666
}
67-
case types.ISearchableContext:
68-
if ctx.IsSearching() {
69-
self.c.Helpers().Search.Cancel()
70-
return nil
71-
}
7267
}
7368

7469
parentContext := currentContext.GetParentContext()

0 commit comments

Comments
 (0)