Skip to content

Commit

Permalink
Windows fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gdamore committed Mar 5, 2024
1 parent d46fe74 commit a7f59b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions console_win.go
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions tscreen.go
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit a7f59b7

Please sign in to comment.