1
1
mirror of https://github.com/walles/moar.git synced 2024-09-19 07:58:00 +03:00

Support SGR 4, underline

diff --git m/ansiTokenizer.go m/ansiTokenizer.go
index 365b76a..7161bc6 100644
--- m/ansiTokenizer.go
+++ m/ansiTokenizer.go
@@ -179,6 +179,9 @@ func _UpdateStyle(logger *log.Logger, style tcell.Style, escapeSequence string)
 		case "1":
 			style = style.Bold(true)

+		case "4":
+			style = style.Underline(true)
+
 		case "7":
 			style = style.Reverse(true)

@@ -226,7 +229,7 @@ func _UpdateStyle(logger *log.Logger, style tcell.Style, escapeSequence string)
 			style = style.Background(tcell.ColorDefault)

 		default:
-			logger.Printf("Unrecognized ANSI SGI code <%s>", number)
+			logger.Printf("Unrecognized ANSI SGR code <%s>", number)
 		}
 	}

Change-Id: I0527cbaff8b53cf25c99876789d69412af5ca118
This commit is contained in:
Johan Walles 2019-09-25 13:41:50 +02:00
parent 719942c137
commit c756bd0288

View File

@ -179,6 +179,9 @@ func _UpdateStyle(logger *log.Logger, style tcell.Style, escapeSequence string)
case "1":
style = style.Bold(true)
case "4":
style = style.Underline(true)
case "7":
style = style.Reverse(true)
@ -226,7 +229,7 @@ func _UpdateStyle(logger *log.Logger, style tcell.Style, escapeSequence string)
style = style.Background(tcell.ColorDefault)
default:
logger.Printf("Unrecognized ANSI SGI code <%s>", number)
logger.Printf("Unrecognized ANSI SGR code <%s>", number)
}
}