Skip to content

Commit

Permalink
Revert "remove ENABLE_VIRTUAL_TERMINAL_INPUT (#9913)"
Browse files Browse the repository at this point in the history
This reverts commit 06ec233.
  • Loading branch information
Jarred-Sumner authored Apr 4, 2024
1 parent 8a3b6f0 commit b720f2a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/output.zig
Original file line number Diff line number Diff line change
Expand Up @@ -189,19 +189,17 @@ 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;

var mode: w.DWORD = undefined;
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;
Expand Down

0 comments on commit b720f2a

Please sign in to comment.