summaryrefslogtreecommitdiffstats
path: root/colorschemes/registry.go
diff options
context:
space:
mode:
Diffstat (limited to 'colorschemes/registry.go')
-rw-r--r--colorschemes/registry.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/colorschemes/registry.go b/colorschemes/registry.go
index d120eb8..baa4bda 100644
--- a/colorschemes/registry.go
+++ b/colorschemes/registry.go
@@ -17,6 +17,9 @@ func init() {
}
}
+// FromName loads a Colorscheme by name; confDir is used to search
+// directories for a scheme matching the name. The search order
+// is the same as for config files.
func FromName(confDir configdir.ConfigDir, c string) (Colorscheme, error) {
if cs, ok := registry[c]; ok {
return cs, nil