1
0
mirror of https://github.com/gdamore/tcell.git synced 2025-04-24 13:48:51 +08:00

Windows fixes

This commit is contained in:
Garrett D'Amore 2024-03-04 21:15:08 -08:00
parent d46fe74547
commit a7f59b7e80
2 changed files with 4 additions and 4 deletions

View File

@ -168,8 +168,8 @@ const (
vtCurlyUnderline = "\x1b[4:3m"
vtDottedUnderline = "\x1b[4:4m"
vtDashedUnderline = "\x1b[4:5m"
vtUnderColor = "\x1b[58;5;%dm"
vtUnderColorRGB = "\x1b[58;2;%d;%d;%dm"
vtUnderColor = "\x1b[58:5:%dm"
vtUnderColorRGB = "\x1b[58:2::%p1%d:%p2%d:%p3%dm"
vtUnderColorReset = "\x1b[59m"
)

View File

@ -379,7 +379,7 @@ func (t *tScreen) prepareUnderlines() {
if t.ti.UnderlineColor != "" {
t.underColor = t.ti.UnderlineColor
} else if t.ti.CurlyUnderline != "" {
t.underColor = "\x1b[58;5;%p1%dm"
t.underColor = "\x1b[58:5:%p1%dm"
}
if t.ti.UnderlineColorRGB != "" {
// An interesting wart here is that in order to facilitate
@ -389,7 +389,7 @@ func (t *tScreen) prepareUnderlines() {
// ncurses took, even though everyone else when another way.
t.underRGB = t.ti.UnderlineColorRGB
} else if t.ti.CurlyUnderline != "" {
t.underRGB = "\x1b[58;2;%p1%d;%p2%d;%p3%dm"
t.underRGB = "\x1b[58:2::%p1%d:%p2%d:%p3%dm"
}
if t.ti.UnderlineColorReset != "" {
t.underFg = t.ti.UnderlineColorReset