mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-29 23:17:32 +02:00
Don't strike out reserved keys in menus (#3365)
It seems to cause more confusion than it helps. Fixes #2819.
This commit is contained in:
commit
ad017459d2
@ -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…
x
Reference in New Issue
Block a user