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:
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
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user