mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-04-27 12:32:37 +02:00
Fix potentially wrong help text in commit message panel
It said "Press tab to toggle focus", which is wrong for people who remapped their togglePanel key binding to something else. Print the actual key binding instead.
This commit is contained in:
parent
bfcff3222c
commit
69575dd4f3
@ -3,7 +3,9 @@ package gui
|
|||||||
import (
|
import (
|
||||||
"github.com/jesseduffield/generics/slices"
|
"github.com/jesseduffield/generics/slices"
|
||||||
"github.com/jesseduffield/gocui"
|
"github.com/jesseduffield/gocui"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/gui/keybindings"
|
||||||
"github.com/jesseduffield/lazygit/pkg/theme"
|
"github.com/jesseduffield/lazygit/pkg/theme"
|
||||||
|
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
type viewNameMapping struct {
|
type viewNameMapping struct {
|
||||||
@ -159,7 +161,10 @@ func (gui *Gui) createAllViews() error {
|
|||||||
|
|
||||||
gui.Views.CommitDescription.Visible = false
|
gui.Views.CommitDescription.Visible = false
|
||||||
gui.Views.CommitDescription.Title = gui.c.Tr.CommitDescriptionTitle
|
gui.Views.CommitDescription.Title = gui.c.Tr.CommitDescriptionTitle
|
||||||
gui.Views.CommitDescription.Subtitle = gui.Tr.CommitDescriptionSubTitle
|
gui.Views.CommitDescription.Subtitle = utils.ResolvePlaceholderString(gui.Tr.CommitDescriptionSubTitle,
|
||||||
|
map[string]string{
|
||||||
|
"togglePanelKeyBinding": keybindings.Label(gui.UserConfig.Keybinding.Universal.TogglePanel),
|
||||||
|
})
|
||||||
gui.Views.CommitDescription.FgColor = theme.GocuiDefaultTextColor
|
gui.Views.CommitDescription.FgColor = theme.GocuiDefaultTextColor
|
||||||
gui.Views.CommitDescription.Editable = true
|
gui.Views.CommitDescription.Editable = true
|
||||||
gui.Views.CommitDescription.Editor = gocui.EditorFunc(gui.commitDescriptionEditor)
|
gui.Views.CommitDescription.Editor = gocui.EditorFunc(gui.commitDescriptionEditor)
|
||||||
|
@ -886,7 +886,7 @@ func EnglishTranslationSet() TranslationSet {
|
|||||||
RebaseOptionsTitle: "Rebase options",
|
RebaseOptionsTitle: "Rebase options",
|
||||||
CommitMessageTitle: "Commit summary",
|
CommitMessageTitle: "Commit summary",
|
||||||
CommitDescriptionTitle: "Commit description",
|
CommitDescriptionTitle: "Commit description",
|
||||||
CommitDescriptionSubTitle: "Press tab to toggle focus",
|
CommitDescriptionSubTitle: "Press {{.togglePanelKeyBinding}} to toggle focus",
|
||||||
LocalBranchesTitle: "Local branches",
|
LocalBranchesTitle: "Local branches",
|
||||||
SearchTitle: "Search",
|
SearchTitle: "Search",
|
||||||
TagsTitle: "Tags",
|
TagsTitle: "Tags",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user