From 7b03f5bab28f389544caa7b5999e950dcfd17c8b Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Mon, 20 Feb 2017 09:28:37 -0500 Subject: [PATCH] Fix bold highlighting not working right --- cmd/micro/colorscheme.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/micro/colorscheme.go b/cmd/micro/colorscheme.go index 74e77018..f0c8adf2 100644 --- a/cmd/micro/colorscheme.go +++ b/cmd/micro/colorscheme.go @@ -107,7 +107,13 @@ func ParseColorscheme(text string) Colorscheme { // The 'extra' can be bold, reverse, or underline func StringToStyle(str string) tcell.Style { var fg, bg string - split := strings.Split(str, ",") + spaceSplit := strings.Split(str, " ") + var split []string + if len(spaceSplit) > 1 { + split = strings.Split(spaceSplit[1], ",") + } else { + split = strings.Split(str, ",") + } if len(split) > 1 { fg, bg = split[0], split[1] } else {