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:
@@ -58,17 +58,12 @@ func (self *QuitActions) Escape() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ctx := currentContext.(type) {
|
// Cancelling searching (as opposed to filtering) is handled by gocui
|
||||||
case types.IFilterableContext:
|
if ctx, ok := currentContext.(types.IFilterableContext); ok {
|
||||||
if ctx.IsFiltering() {
|
if ctx.IsFiltering() {
|
||||||
self.c.Helpers().Search.Cancel()
|
self.c.Helpers().Search.Cancel()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
case types.ISearchableContext:
|
|
||||||
if ctx.IsSearching() {
|
|
||||||
self.c.Helpers().Search.Cancel()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parentContext := currentContext.GetParentContext()
|
parentContext := currentContext.GetParentContext()
|
||||||
|
Reference in New Issue
Block a user