Revert "update virtual terminal processing (#13710)"

This reverts commit a88f46c6c9.
This commit is contained in:
Darren Schroeder 2024-09-30 08:46:54 -05:00 committed by GitHub
parent f0c83a4459
commit 03440907c4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,7 +7,6 @@ pub fn enable_vt_processing() -> Result<()> {
use crossterm_winapi::{ConsoleMode, Handle};
pub const ENABLE_PROCESSED_OUTPUT: u32 = 0x0001;
pub const ENABLE_VIRTUAL_TERMINAL_INPUT: u32 = 0x0200;
pub const ENABLE_VIRTUAL_TERMINAL_PROCESSING: u32 = 0x0004;
let mask = ENABLE_VIRTUAL_TERMINAL_PROCESSING;
@ -18,12 +17,8 @@ pub fn enable_vt_processing() -> Result<()> {
// enable_processed_output and enable_virtual_terminal_processing should be used
if old_mode & mask == 0 {
console_mode.set_mode(
old_mode
| ENABLE_PROCESSED_OUTPUT
| ENABLE_VIRTUAL_TERMINAL_PROCESSING
| ENABLE_VIRTUAL_TERMINAL_INPUT,
)?
console_mode
.set_mode(old_mode | ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING)?
}
}
Ok(())