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

Setting the terminal colour to :default is special #24

Merged
merged 1 commit into from
Oct 29, 2023

Conversation

tecosaur
Copy link
Collaborator

It is worth taking note of the fact that the "default" colour in a
terminal can be set with the -9 ANSI codes. Without this, dodgy control
codes can be emitted when the current default face is changed, resulting
in visual artifacts.

It is worth taking note of the fact that the "default" colour in a
terminal can be set with the -9 ANSI codes. Without this, dodgy control
codes can be emitted when the current default face is changed, resulting
in visual artifacts.
@tecosaur tecosaur merged commit 38ae1b3 into main Oct 29, 2023
3 of 4 checks passed
@tecosaur tecosaur deleted the specialcase-default-color-printing branch October 29, 2023 15:03
@caleb-allen
Copy link
Contributor

Out of curiosity, is this well supported? I know that the reset code for the cursor is often quite buggy

@tecosaur
Copy link
Collaborator Author

My impression is that \e[39m and friends are very well supported. As a "near-worst case" test I just tried and it worked fine in TTY1. "Cursor reset" is in a separate terminal comparability bag in my mind at least.

We actually want to fix the "dodgy control codes can be emitted" issue at some point in the future. I see this as basically an indirect fix that also makes some sense in its own right.

@caleb-allen
Copy link
Contributor

For sure, makes perfect sense 👍

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