From 159932ff3ecdc9f7d30ac026480587b84edb895b Mon Sep 17 00:00:00 2001 From: sawka Date: Mon, 13 Jun 2022 03:41:41 -0700 Subject: [PATCH] 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 --- internal/app/darktile/termutil/csi.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/app/darktile/termutil/csi.go b/internal/app/darktile/termutil/csi.go index df2471d..aa5569c 100644 --- a/internal/app/darktile/termutil/csi.go +++ b/internal/app/darktile/termutil/csi.go @@ -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":