From 06ec233ebebccb88134a0c3866a097c985c293f4 Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Thu, 4 Apr 2024 00:30:20 -0700 Subject: [PATCH] remove ENABLE_VIRTUAL_TERMINAL_INPUT (#9913) --- src/output.zig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/output.zig b/src/output.zig index 36c274f14b..89940a37a5 100644 --- a/src/output.zig +++ b/src/output.zig @@ -189,7 +189,6 @@ pub const Source = struct { console_codepage = w.kernel32.GetConsoleOutputCP(); _ = SetConsoleCP(CP_UTF8); - const ENABLE_VIRTUAL_TERMINAL_INPUT = 0x200; const ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002; const ENABLE_PROCESSED_OUTPUT = 0x0001; @@ -197,9 +196,12 @@ pub const Source = struct { if (w.kernel32.GetConsoleMode(stdin, &mode) != 0) { console_mode[0] = mode; bun_stdio_tty[0] = 1; - _ = SetConsoleMode(stdin, mode | ENABLE_VIRTUAL_TERMINAL_INPUT); } + // ENABLE_VIRTUAL_TERMINAL_PROCESSING to enable ansi escape sequences + // ENABLE_PROCESSED_OUTUPT is enabled because ENABLE_VIRTUAL_TERMINAL_PROCESSING is enabled + // ENABLE_WRAP_AT_EOL_OUPTUT will prevent output from being cut off at the end of the line + if (w.kernel32.GetConsoleMode(stdout, &mode) != 0) { console_mode[1] = mode; bun_stdio_tty[1] = 1;