mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-30 03:23:08 +03:00
Remove sub_commits_context's Title method
It implemented this because it wants to do custom truncation of the ref name; however, we can achieve the same thing by passing the truncated ref name to our DynamicTitleBuilder, which was previously unused.
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/git_commands"
|
||||
"github.com/jesseduffield/lazygit/pkg/commands/models"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
var _ types.IController = &SwitchToSubCommitsController{}
|
||||
@ -78,7 +79,7 @@ func (self *SwitchToSubCommitsController) viewCommits() error {
|
||||
subCommitsContext.SetSelectedLineIdx(0)
|
||||
subCommitsContext.SetParentContext(self.context)
|
||||
subCommitsContext.SetWindowName(self.context.GetWindowName())
|
||||
subCommitsContext.SetTitleRef(ref.Description())
|
||||
subCommitsContext.SetTitleRef(utils.TruncateWithEllipsis(ref.RefName(), 50))
|
||||
subCommitsContext.SetRef(ref)
|
||||
subCommitsContext.SetLimitCommits(true)
|
||||
subCommitsContext.SetShowBranchHeads(self.context.ShowBranchHeadsInSubCommits())
|
||||
|
Reference in New Issue
Block a user