Fix display of panel jump keys for disabled bindings

This commit is contained in:
Stefan Haller
2025-07-27 12:27:56 +02:00
parent b9f4c43695
commit 72a8e8194d
+7 -1
View File
@@ -205,9 +205,15 @@ func (gui *Gui) configureViewProperties() {
gui.Views.CommitDescription.TextArea.AutoWrapWidth = gui.c.UserConfig().Git.Commit.AutoWrapWidth
if gui.c.UserConfig().Gui.ShowPanelJumps {
keyToTitlePrefix := func(key string) string {
if key == "<disabled>" {
return ""
}
return fmt.Sprintf("[%s]", key)
}
jumpBindings := gui.c.UserConfig().Keybinding.Universal.JumpToBlock
jumpLabels := lo.Map(jumpBindings, func(binding string, _ int) string {
return fmt.Sprintf("[%s]", binding)
return keyToTitlePrefix(binding)
})
gui.Views.Status.TitlePrefix = jumpLabels[0]