mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 12:25:47 +02:00
Don't strike out reserved keys in menus
It seems to cause more confusion than it helps.
This commit is contained in:
parent
8d9e5d1258
commit
cfaf4b29d0
1 changed files with 1 additions and 14 deletions
|
@ -92,21 +92,8 @@ func (self *MenuViewModel) GetDisplayStrings(_ int, _ int) [][]string {
|
|||
return displayStrings
|
||||
}
|
||||
|
||||
// These keys are used for general navigation so we'll strike them out to
|
||||
// avoid confusion
|
||||
reservedKeys := []string{
|
||||
self.c.UserConfig.Keybinding.Universal.Confirm,
|
||||
self.c.UserConfig.Keybinding.Universal.Select,
|
||||
self.c.UserConfig.Keybinding.Universal.Return,
|
||||
self.c.UserConfig.Keybinding.Universal.StartSearch,
|
||||
}
|
||||
keyLabel := keybindings.LabelFromKey(item.Key)
|
||||
keyStyle := style.FgCyan
|
||||
if lo.Contains(reservedKeys, keyLabel) {
|
||||
keyStyle = style.FgDefault.SetStrikethrough()
|
||||
}
|
||||
|
||||
displayStrings = utils.Prepend(displayStrings, keyStyle.Sprint(keyLabel))
|
||||
displayStrings = utils.Prepend(displayStrings, style.FgCyan.Sprint(keyLabel))
|
||||
return displayStrings
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue