From 13f52ce1b9a13db863dc137a1f5e3225fea11912 Mon Sep 17 00:00:00 2001 From: Erik Davidson Date: Sat, 21 Jul 2018 23:09:26 -0500 Subject: [PATCH 1/2] Fix resetting display attributes on VT100 output --- output_vt100.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output_vt100.go b/output_vt100.go index 3b3031d7..23b9844b 100644 --- a/output_vt100.go +++ b/output_vt100.go @@ -236,7 +236,7 @@ func (w *VT100Writer) SetColor(fg, bg Color, bold bool) { if bold { w.SetDisplayAttributes(fg, bg, DisplayBold) } else { - w.SetDisplayAttributes(fg, bg, DisplayDefaultFont) + w.SetDisplayAttributes(fg, bg, DisplayDefaultFont, DisplayReset) } return } From c044ba6076d65baf944ba879cabc7c42e77d3897 Mon Sep 17 00:00:00 2001 From: c-bata Date: Sat, 20 Oct 2018 14:28:43 +0900 Subject: [PATCH 2/2] Fix resetting attributes for arch linux --- output_vt100.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/output_vt100.go b/output_vt100.go index 23b9844b..81c5e122 100644 --- a/output_vt100.go +++ b/output_vt100.go @@ -236,7 +236,9 @@ func (w *VT100Writer) SetColor(fg, bg Color, bold bool) { if bold { w.SetDisplayAttributes(fg, bg, DisplayBold) } else { - w.SetDisplayAttributes(fg, bg, DisplayDefaultFont, DisplayReset) + // If using `DisplayDefualt`, it will be broken in some environment. + // Details are https://github.com/c-bata/go-prompt/pull/85 + w.SetDisplayAttributes(fg, bg, DisplayReset) } return }