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

Add ability to configure branch color patterns

This commit is contained in:
Mauricio Trajano
2024-12-26 20:30:44 -05:00
committed by Stefan Haller
parent 3e623cd1ce
commit c64a7904b7
7 changed files with 58 additions and 11 deletions

View File

@ -455,7 +455,13 @@ func (gui *Gui) onUserConfigLoaded() error {
} else if userConfig.Gui.ShowIcons {
icons.SetNerdFontsVersion("2")
}
presentation.SetCustomBranches(userConfig.Gui.BranchColors)
if len(userConfig.Gui.BranchColorPatterns) > 0 {
presentation.SetCustomBranches(userConfig.Gui.BranchColorPatterns, true)
} else {
// Fall back to the deprecated branchColors config
presentation.SetCustomBranches(userConfig.Gui.BranchColors, false)
}
return nil
}