-
Notifications
You must be signed in to change notification settings - Fork 19
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
ANSI color is not retained across multiple print(ln)!
's in Windows legacy console
#230
Comments
Each anstyle/crates/anstream/src/_macros.rs Lines 130 to 151 in fabe0c3
Each anstyle/crates/anstream/src/lib.rs Lines 70 to 73 in fabe0c3
anstyle/crates/anstream/src/auto.rs Lines 256 to 262 in fabe0c3
anstyle/crates/anstream/src/wincon.rs Lines 115 to 131 in fabe0c3
The next layer down of anstyle/crates/anstyle-wincon/src/stream.rs Lines 140 to 150 in fabe0c3
During one of the redesigns, I had explored keeping global state to "remember" where we left off between instances of The easy workaround is to call As for fixing this, we'll need to think on this more of what we want to optimize for and what is the right answer. |
Cargo.toml
src/main.rs
Steps to reproduce
Run
cargo run
in CMD/PowerShell with 'Legacy Console mode' enabled.Expected result
All the lines should be displayed in gray, just like in the non-legacy Windows Console.
Actual result
Only the lines that output
\x1b[90m
are displayed in gray (1st and 3rd lines).Environment
10.0.19045.5011
17.11.5
/ Windows 11 SDK10.0.26100.0
x86_64-pc-windows-msvc
stable-x86_64-pc-windows-msvc
(default) / rustc1.82.0
(f6e511eec 2024-10-15
)The text was updated successfully, but these errors were encountered: