Skip to content

Commit 5839b5f

Browse files
authored
Merge pull request #650 from krissetto/fix-style-nil-deref
fix nil deref
2 parents b5447b1 + b7d1361 commit 5839b5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/tui/styles/styles.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,13 @@ func toChroma(style ansi.StylePrimitive) string {
344344
if style.BackgroundColor != nil {
345345
s = append(s, "bg:"+*style.BackgroundColor)
346346
}
347-
if *style.Italic {
347+
if style.Italic != nil && *style.Italic {
348348
s = append(s, "italic")
349349
}
350-
if *style.Bold {
350+
if style.Bold != nil && *style.Bold {
351351
s = append(s, "bold")
352352
}
353-
if *style.Underline {
353+
if style.Underline != nil && *style.Underline {
354354
s = append(s, "underline")
355355
}
356356

0 commit comments

Comments
 (0)