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

fix: set correct bg colour for trailing line whitespaces #73

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

Romankivs
Copy link
Contributor

Fixes issue: #72

Trailing whitespaces aren't coloured correctly when inserted inside of render_line:

  • render_line inserts empty whitespace characters after rendering the last token that is available.
  • render_slice that is used for rendering individual tokens finishes by inserting "[m" ASCII escape sequence which resets all previously set style options including background colour.
  • Trailing whitespace characters are inserted without any background colour specified.

So in order to properly insert trailing whitespace we must specify a background colour ASCII escape sequence before that.

Copy link
Owner

@sminez sminez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this.

@sminez sminez merged commit c75c7ac into sminez:develop Jan 15, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants