Fix custom colorscheme not loading (Close #93)

This commit is contained in:
Caleb Bassi 2019-01-14 19:39:37 -08:00
parent 13b6294176
commit c1d7aad179
2 changed files with 4 additions and 3 deletions

View File

@ -1,5 +1,5 @@
// Example json file to put in `~/.config/gotop/{name}.json` and load with
// `gotop -c {name}`. MUST DELETE THESE COMMENTS in order to load.
// `gotop -c {name}`. MUST DELETE THESE COMMENTS AND RENAME FILE in order to load.
{
"Fg": 7,
"Bg": -1,

View File

@ -125,10 +125,11 @@ func handleColorscheme(cs string) error {
case "default-dark":
colorscheme = colorschemes.DefaultDark
default:
if colorscheme, err := getCustomColorscheme(cs); err != nil {
colorscheme = colorscheme
custom, err := getCustomColorscheme(cs)
if err != nil {
return err
}
colorscheme = custom
}
return nil
}