Go: Fix parsing of nullable colors

Fixes #6629
This commit is contained in:
Kovid Goyal
2023-09-15 20:36:24 +05:30
parent 5c4efc0fd7
commit 863adb3e8d
2 changed files with 2 additions and 1 deletions

View File

@@ -169,6 +169,7 @@ func create_formatters() {
return ans
}
format_as_sgr.filler = only_open("bg=" + conf.Filler_bg.AsRGBSharp())
debugprintln(11111, conf.Margin_filler_bg.IsSet)
if conf.Margin_filler_bg.IsSet {
format_as_sgr.margin_filler = only_open("bg=" + conf.Margin_filler_bg.Color.AsRGBSharp())
} else {

View File

@@ -172,7 +172,7 @@ func ParseColorOrNone(color string) (NullableColor, error) {
return NullableColor{}, nil
}
c, err := ParseColor(raw)
return NullableColor{Color: c}, err
return NullableColor{Color: c, IsSet: err == nil}, err
}
var named_colors = map[string]uint8{