aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Build
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2024-05-29 20:13:11 -0700
committerRyan Liptak <squeek502@hotmail.com>2024-06-02 16:46:21 -0700
commit337f09e93297f8097e7b5093ea138b60f2c52e5f (patch)
tree08dabdb8d902c88de29ab40ab5d3074934e84e8d /lib/std/Build
parent17dc93934689235ac16b3354c3eb932420a88e85 (diff)
downloadzig-337f09e93297f8097e7b5093ea138b60f2c52e5f.tar.gz
zig-337f09e93297f8097e7b5093ea138b60f2c52e5f.zip
Add `File.getOrEnableAnsiEscapeSupport` and use it
On Windows, the console mode flag `ENABLE_VIRTUAL_TERMINAL_PROCESSING` determines whether or not ANSI escape codes are parsed/acted on. On the newer Windows Terminal, this flag is set by default, but on the older Windows Console, it is not set by default, but *can* be enabled (since Windows 10 RS1 from June 2016). The new `File.getOrEnableAnsiEscapeSupport` function will get the current status of ANSI escape code support, but will also attempt to enable `ENABLE_VIRTUAL_TERMINAL_PROCESSING` on Windows if necessary which will provide better/more consistent results for things like `std.Progress` and `std.io.tty`. This type of change was not done previously due to a mistaken assumption (on my part) that the console mode would persist after the run of a program. However, it turns out that the console mode is always reset to the default for each program run in a console session.
Diffstat (limited to 'lib/std/Build')
0 files changed, 0 insertions, 0 deletions