mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Don't allow opening a menu while the search or filter prompt is open
This solves several problems that arise from opening a menu while the prompt is open. We might try to solve these in a different way, e.g. by dismissing the search prompt before opening a menu, but restricting what you can do while the prompt is open seems like the more robust fix. To achieve this, we - call resetKeyBindings both when opening and when closing the search/filter prompt - change the keybindings to only contain the ones for the search prompt when that context is active.
This commit is contained in:
parent
4ec9262ff6
commit
9ec77bba91
4 changed files with 35 additions and 7 deletions
|
@ -140,6 +140,10 @@ func (self *guiCommon) CallKeybindingHandler(binding *types.Binding) error {
|
|||
return self.gui.callKeybindingHandler(binding)
|
||||
}
|
||||
|
||||
func (self *guiCommon) ResetKeybindings() error {
|
||||
return self.gui.resetKeybindings()
|
||||
}
|
||||
|
||||
func (self *guiCommon) IsAnyModeActive() bool {
|
||||
return self.gui.helpers.Mode.IsAnyModeActive()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue