mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-11 16:16:28 -04:00
Include commands without keybinding in options menu
This is not a behavior change, we already include these in the menu, but that's because of a bug that we will fix in the next commit. I find it useful to see these commands, especially for rarely-used custom commands that you don't want to waste a keybinding on.
This commit is contained in:
parent
2bd6881f60
commit
7fe96e9aee
|
|
@ -1,7 +1,6 @@
|
|||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
"github.com/samber/lo"
|
||||
|
|
@ -61,7 +60,7 @@ func (self *OptionsMenuAction) getBindings(context types.Context) ([]*types.Bind
|
|||
bindings, _ := self.c.GetInitialKeybindingsWithCustomCommands()
|
||||
|
||||
for _, binding := range bindings {
|
||||
if keybindings.LabelFromKey(binding.Key) != "" && binding.Description != "" {
|
||||
if binding.Description != "" {
|
||||
if binding.ViewName == "" {
|
||||
bindingsGlobal = append(bindingsGlobal, binding)
|
||||
} else if binding.ViewName == context.GetViewName() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue