mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-15 01:34:26 +02:00
Make it possible to set the nerd fonts version to "off"
We don't need this for production code, but it will be needed for tests in the next commit.
This commit is contained in:
@ -13,14 +13,18 @@ func IsIconEnabled() bool {
|
||||
}
|
||||
|
||||
func SetNerdFontsVersion(version string) {
|
||||
if !lo.Contains([]string{"2", "3"}, version) {
|
||||
log.Fatalf("Unsupported nerdFontVersion %s", version)
|
||||
}
|
||||
if version == "" {
|
||||
isIconEnabled = false
|
||||
} else {
|
||||
if !lo.Contains([]string{"2", "3"}, version) {
|
||||
log.Fatalf("Unsupported nerdFontVersion %s", version)
|
||||
}
|
||||
|
||||
if version == "2" {
|
||||
patchGitIconsForNerdFontsV2()
|
||||
patchFileIconsForNerdFontsV2()
|
||||
}
|
||||
if version == "2" {
|
||||
patchGitIconsForNerdFontsV2()
|
||||
patchFileIconsForNerdFontsV2()
|
||||
}
|
||||
|
||||
isIconEnabled = true
|
||||
isIconEnabled = true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user