Improve Windows client parity
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s

This commit is contained in:
DuProcess
2026-07-16 19:41:23 -04:00
parent be98fb8d91
commit c03a2843ee
4 changed files with 96 additions and 42 deletions
+22 -2
View File
@@ -9929,7 +9929,22 @@ fn flush_local_terminal_input() {
}
}
#[cfg(not(unix))]
#[cfg(windows)]
fn flush_local_terminal_input() {
unsafe {
use windows_sys::Win32::Foundation::INVALID_HANDLE_VALUE;
use windows_sys::Win32::System::Console::{
FlushConsoleInputBuffer, GetStdHandle, STD_INPUT_HANDLE,
};
let handle = GetStdHandle(STD_INPUT_HANDLE);
if !handle.is_null() && handle != INVALID_HANDLE_VALUE {
let _ = FlushConsoleInputBuffer(handle);
}
}
}
#[cfg(all(not(unix), not(windows)))]
fn flush_local_terminal_input() {}
#[cfg(unix)]
@@ -9954,7 +9969,12 @@ fn drain_local_terminal_input() {
}
}
#[cfg(not(unix))]
#[cfg(windows)]
fn drain_local_terminal_input() {
flush_local_terminal_input();
}
#[cfg(all(not(unix), not(windows)))]
fn drain_local_terminal_input() {}
impl Drop for RawMode {