diff options
| author | Ryan Liptak <squeek502@hotmail.com> | 2022-12-14 20:01:11 -0800 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-12-15 03:49:26 -0500 |
| commit | 88d927a511922efd82c4ec862c8e2aa83df84391 (patch) | |
| tree | 16449de5465989e1e3f8ae7894b5544cd9491109 /lib/std/math.zig | |
| parent | 83e0e23f8aa2d90495bbf9c3649aa68f7c55c926 (diff) | |
| download | zig-88d927a511922efd82c4ec862c8e2aa83df84391.tar.gz zig-88d927a511922efd82c4ec862c8e2aa83df84391.zip | |
std.debug.TTY: Fix colors not resetting on Windows
This fixes a regression introduced in #12298 where colors would never reset in a Windows console because the attributes would be queried on every `setColor` call, and then try to 'reset' the attributes to what it just queried (i.e. it was essentially doing a complicated no-op on .Reset).
This fixes the problem while (I think) keeping with the spirit of the changes in #12298--that is, `TTY.Config` is not specifically tied to stderr like it was before #12298. To that end, detectTTYConfig now takes a `File` and that's what gets used to query the initial attributes to reset to.
(for context, before #12298, the first `setColor` call is where the reset attributes would get queried and it would always use stderr to do it)
Diffstat (limited to 'lib/std/math.zig')
0 files changed, 0 insertions, 0 deletions
