ANSI CSI 22m should also turn off bold (#338)

* ANSI CSI 22m should also turn off bold

* CellAttributes bold/dim are mutually exclusive, so 'CSI 1 m' should turn off dim, and 'CSI 2 m' should turn off bold
This commit is contained in:
sawka 2022-06-13 03:41:41 -07:00 committed by GitHub
parent 93392fc149
commit 159932ff3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -911,7 +911,9 @@ func (t *Terminal) sgrSequenceHandler(params []string) bool {
*attr = CellAttributes{}
case "1", "01":
t.GetActiveBuffer().getCursorAttr().bold = true
t.GetActiveBuffer().getCursorAttr().dim = false
case "2", "02":
t.GetActiveBuffer().getCursorAttr().bold = false
t.GetActiveBuffer().getCursorAttr().dim = true
case "3", "03":
t.GetActiveBuffer().getCursorAttr().italic = true
@ -929,6 +931,7 @@ func (t *Terminal) sgrSequenceHandler(params []string) bool {
t.GetActiveBuffer().getCursorAttr().bold = false
case "22":
t.GetActiveBuffer().getCursorAttr().dim = false
t.GetActiveBuffer().getCursorAttr().bold = false
case "23":
t.GetActiveBuffer().getCursorAttr().italic = false
case "24":