mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Do not include keybindings from another view in keybindings menu
Previously we included all navigation keybindings from all views in the keybindings menu, meaning if you pressed enter on 'next page' in the commits view, you'd end up triggering the action in the sub-commits view.
This commit is contained in:
parent
d4a0ca35c7
commit
fc8998e377
1 changed files with 5 additions and 3 deletions
|
@ -69,10 +69,12 @@ func (self *OptionsMenuAction) getBindings(context types.Context) ([]*types.Bind
|
|||
if keybindings.LabelFromKey(binding.Key) != "" && binding.Description != "" {
|
||||
if binding.ViewName == "" {
|
||||
bindingsGlobal = append(bindingsGlobal, binding)
|
||||
} else if binding.Tag == "navigation" {
|
||||
bindingsNavigation = append(bindingsNavigation, binding)
|
||||
} else if binding.ViewName == context.GetViewName() {
|
||||
bindingsPanel = append(bindingsPanel, binding)
|
||||
if binding.Tag == "navigation" {
|
||||
bindingsNavigation = append(bindingsNavigation, binding)
|
||||
} else {
|
||||
bindingsPanel = append(bindingsPanel, binding)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue