mirror of
https://github.com/nushell/nushell.git
synced 2025-08-12 08:09:10 +02:00
Revert "update virtual terminal processing (#13710)"
This reverts commit a88f46c6c9
.
This commit is contained in:
@ -7,7 +7,6 @@ pub fn enable_vt_processing() -> Result<()> {
|
|||||||
use crossterm_winapi::{ConsoleMode, Handle};
|
use crossterm_winapi::{ConsoleMode, Handle};
|
||||||
|
|
||||||
pub const ENABLE_PROCESSED_OUTPUT: u32 = 0x0001;
|
pub const ENABLE_PROCESSED_OUTPUT: u32 = 0x0001;
|
||||||
pub const ENABLE_VIRTUAL_TERMINAL_INPUT: u32 = 0x0200;
|
|
||||||
pub const ENABLE_VIRTUAL_TERMINAL_PROCESSING: u32 = 0x0004;
|
pub const ENABLE_VIRTUAL_TERMINAL_PROCESSING: u32 = 0x0004;
|
||||||
let mask = ENABLE_VIRTUAL_TERMINAL_PROCESSING;
|
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
|
// enable_processed_output and enable_virtual_terminal_processing should be used
|
||||||
|
|
||||||
if old_mode & mask == 0 {
|
if old_mode & mask == 0 {
|
||||||
console_mode.set_mode(
|
console_mode
|
||||||
old_mode
|
.set_mode(old_mode | ENABLE_PROCESSED_OUTPUT | ENABLE_VIRTUAL_TERMINAL_PROCESSING)?
|
||||||
| ENABLE_PROCESSED_OUTPUT
|
|
||||||
| ENABLE_VIRTUAL_TERMINAL_PROCESSING
|
|
||||||
| ENABLE_VIRTUAL_TERMINAL_INPUT,
|
|
||||||
)?
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
Reference in New Issue
Block a user