summaryrefslogtreecommitdiffstats
path: root/colorschemes/registry.go
diff options
context:
space:
mode:
Diffstat (limited to 'colorschemes/registry.go')
-rw-r--r--colorschemes/registry.go11
1 files changed, 4 insertions, 7 deletions
diff --git a/colorschemes/registry.go b/colorschemes/registry.go
index 8f86491..b6263c9 100644
--- a/colorschemes/registry.go
+++ b/colorschemes/registry.go
@@ -18,14 +18,11 @@ func init() {
}
func FromName(confDir configdir.ConfigDir, c string) (Colorscheme, error) {
- cs, ok := registry[c]
- if !ok {
- cs, err := getCustomColorscheme(confDir, c)
- if err != nil {
- return cs, err
- }
+ if cs, ok := registry[c]; ok {
+ return cs, nil
}
- return cs, nil
+ cs, err := getCustomColorscheme(confDir, c)
+ return cs, err
}
func register(name string, c Colorscheme) {