Skip to content

Commit 72a8e81

Browse files
committed
Fix display of panel jump keys for disabled bindings
1 parent b9f4c43 commit 72a8e81

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pkg/gui/views.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,15 @@ func (gui *Gui) configureViewProperties() {
205205
gui.Views.CommitDescription.TextArea.AutoWrapWidth = gui.c.UserConfig().Git.Commit.AutoWrapWidth
206206

207207
if gui.c.UserConfig().Gui.ShowPanelJumps {
208+
keyToTitlePrefix := func(key string) string {
209+
if key == "<disabled>" {
210+
return ""
211+
}
212+
return fmt.Sprintf("[%s]", key)
213+
}
208214
jumpBindings := gui.c.UserConfig().Keybinding.Universal.JumpToBlock
209215
jumpLabels := lo.Map(jumpBindings, func(binding string, _ int) string {
210-
return fmt.Sprintf("[%s]", binding)
216+
return keyToTitlePrefix(binding)
211217
})
212218

213219
gui.Views.Status.TitlePrefix = jumpLabels[0]

0 commit comments

Comments
 (0)