-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resetting display attributes on VT100 output #85
Conversation
If it helps, I've made the same changes in a project of mine and works for me. |
Patch working for me too. I found this after I filed #93 for it. Thanks! |
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems to be equivalent to following:
w.SetDisplayAttributes(fg, bg, DisplayReset)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was another thing I tried that seemed to work but I didn't want to take out the DisplayDefaultFont in case it did something I wasn't aware of.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@c-bata any progress on merging it?
Merge this changes into master after removing |
Merged this in #104. Thanks. |
I'm using go-prompt on urxvt on Arch Linux and I'm running into an issue where the bold attribute isn't being reset correctly after its first use. I don't know a lot about ANSI/VT100 but I wasn't able to find the '10' attribute that was currently being used, so I added the '0' attribute in addition to it. This fixed the bold not being reset on my terminal.
I haven't had a chance to test on Windows, Mac or the Gnome Terminal yet.