1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-27 00:51:18 +02:00

use colour

This commit is contained in:
Jesse Duffield
2022-03-27 17:22:31 +11:00
parent 9c226eed37
commit e94312b664

View File

@ -5,6 +5,7 @@ import (
"github.com/jesseduffield/gocui"
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
"github.com/jesseduffield/lazygit/pkg/gui/presentation"
"github.com/jesseduffield/lazygit/pkg/gui/style"
"github.com/jesseduffield/lazygit/pkg/gui/types"
)
@ -87,7 +88,7 @@ func (self *MenuViewModel) GetDisplayStrings(_startIdx int, _length int) [][]str
return slices.Map(self.menuItems, func(item *types.MenuItem) []string {
displayStrings := getItemDisplayStrings(item)
if showKeys {
displayStrings = slices.Prepend(displayStrings, keybindings.GetKeyDisplay(item.Key))
displayStrings = slices.Prepend(displayStrings, style.FgYellow.Sprint(keybindings.GetKeyDisplay(item.Key)))
}
return displayStrings
})