1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-05-29 23:17:32 +02:00

Bugfix: properly set title of subcommits panel when refreshing

This fixes two problems:
- Set the title ref to the commit description (like
  SwitchToDiffFilesController.enter does), rather than just the hash
- SetTitleRef only sets the title of the DynamicTitleBuilder, but doesn't set it
  on the view; this only happens in ContextMgr.Activate, so you'd have to switch
  to a different side panel and then back to see the new title.
This commit is contained in:
Stefan Haller 2024-08-26 08:21:17 +02:00
parent 567e898e22
commit a2c4fad410

View File

@ -286,7 +286,8 @@ func (self *RefreshHelper) refreshCommitsAndCommitFiles() {
commit := self.c.Contexts().LocalCommits.GetSelected()
if commit != nil && commit.RefName() != "" {
self.c.Contexts().CommitFiles.SetRef(commit)
self.c.Contexts().CommitFiles.SetTitleRef(commit.RefName())
self.c.Contexts().CommitFiles.SetTitleRef(commit.Description())
self.c.Contexts().CommitFiles.GetView().Title = self.c.Contexts().CommitFiles.Title()
_ = self.refreshCommitFilesContext()
}
}