From d9b3e16e003cda3fea892351a212d8f6fae646f0 Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Mon, 12 Aug 2024 20:44:40 +0200 Subject: [PATCH] Render underline color changes --- twin/styles.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/twin/styles.go b/twin/styles.go index 8be69f2..b375788 100644 --- a/twin/styles.go +++ b/twin/styles.go @@ -180,6 +180,10 @@ func (current Style) RenderUpdateFrom(previous Style, terminalColorCount ColorCo builder.WriteString(current.bg.ansiString(colorTypeBackground, terminalColorCount)) } + if current.underlineColor != previous.underlineColor { + builder.WriteString(current.underlineColor.ansiString(colorTypeUnderline, terminalColorCount)) + } + // Handle AttrDim / AttrBold changes previousBoldDim := previous.attrs & (AttrBold | AttrDim) currentBoldDim := current.attrs & (AttrBold | AttrDim)