Skip to content

Conversation

@tecosaur
Copy link
Member

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
@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
Member 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