1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-24 19:39:16 +02:00

Cleanup: remove dead code

Cancelling searching (as opposed to filtering) is handled by gocui.
This commit is contained in:
Stefan Haller
2025-08-12 18:08:27 +02:00
parent 4961c4b678
commit 0af439ddf5

View File

@@ -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()