Skip to content
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

[BUG] Overrides previous ANSI style #50

Open
C0DK opened this issue Oct 30, 2019 · 4 comments
Open

[BUG] Overrides previous ANSI style #50

C0DK opened this issue Oct 30, 2019 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@C0DK
Copy link

C0DK commented Oct 30, 2019

Describe the bug
So this is pretty simple to replicate and test, but \x1b[1m \x1b[31m test this string will not be bold, which it should, based on ANSI standards. the first ANSI styling is overwritten by the second, however i don't use any reset flag so it shouldn't.. the following two strings should be identical, but they are not: \x1b[1m\x1b[31m test and \x1b[1;31m test.

YOu can easily test the expected output by using echo -e "\x1b[1m \x1b[31m test" - it basically seems like gocui overwrites the current color scheme/settings at every call, which IMO is a bug. Not sure if it's a feature. hehe

Environment (please complete the following information):

  • OS: Linux
@C0DK C0DK added the bug Something isn't working label Oct 30, 2019
@glvr182 glvr182 self-assigned this Oct 30, 2019
@glvr182
Copy link
Member

glvr182 commented Oct 30, 2019

Thank you for the report! Right now we are reworking some things in the rendering part (see #47 #49)
After those (maybe even during) I'll check if i can fix it!

@MichaelMure
Copy link

No idea if it's useful for this particular issue but I wrote some code to accumulate multiple ANSI escape code together: https://github.com/MichaelMure/go-term-text/blob/master/escape_state.go

@kamushadenes
Copy link

Hello, any updates on that? I noticed this bug when testing zerolog.ConsoleWriter but inside and outside a gocui frame.

@kamushadenes
Copy link

kamushadenes commented Jul 20, 2022

I'm talking about this:

Screen Shot 2022-07-20 at 18 23 32
Screen Shot 2022-07-20 at 18 23 44

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants