1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-03-31 22:22:14 +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:
Stefan Haller 2023-10-14 15:32:03 +02:00
parent 23befdd13a
commit c89ef8b84a

@ -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
}
}