1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00

Fix escape not cancelling filter mode, but closing the menu instead

When filtering is on in a menu, pressing esc should only cancel the filter, but
not close the menu.
This commit is contained in:
Stefan Haller
2023-08-30 22:31:04 +02:00
parent ce91de76e4
commit de4224bbe4
3 changed files with 42 additions and 0 deletions

View File

@ -65,6 +65,11 @@ func (self *MenuController) press() error {
}
func (self *MenuController) close() error {
if self.context().IsFiltering() {
self.c.Helpers().Search.Cancel()
return nil
}
return self.c.PopContext()
}