diff options
Diffstat (limited to 'colorschemes/registry.go')
-rw-r--r-- | colorschemes/registry.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/colorschemes/registry.go b/colorschemes/registry.go index 97e2bb0..d79271d 100644 --- a/colorschemes/registry.go +++ b/colorschemes/registry.go @@ -9,6 +9,12 @@ import ( var registry map[string]Colorscheme +func init() { + if registry == nil { + registry = make(map[string]Colorscheme) + } +} + func FromName(confDir string, c string) (Colorscheme, error) { cs, ok := registry[c] if !ok { |