1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

Improve name handling

This commit is contained in:
Jesse Duffield
2023-07-16 13:43:20 +10:00
parent d19d89ea9d
commit c713d550c0
8 changed files with 189 additions and 19 deletions

View File

@ -38,6 +38,12 @@ func GetWorktreeDisplayString(isCurrent bool, isPathMissing bool, worktree *mode
if icons.IsIconEnabled() {
res = append(res, textStyle.Sprint(icon))
}
res = append(res, textStyle.Sprint(worktree.Name()))
name := worktree.Name()
if worktree.Main() {
// TODO: i18n
name += " (main worktree)"
}
res = append(res, textStyle.Sprint(name))
return res
}