diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-08-19 04:43:28 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-19 04:43:28 +0300 |
| commit | a5c69beabfc82d9c3f9563eb821139b2e0f3e14f (patch) | |
| tree | 9b7049e4629913dcab40d985df399acee262b67b /src/input | |
| parent | 3667151744e379ac5c8f76d57203b675de8a6ebc (diff) | |
fix(perf): eliminate redundant terminal wake work (#2962)
* fix(perf): eliminate redundant terminal wake work
* fix(perf): harden release benchmark gate
* test(perf): strengthen performance guardrails
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/mod.rs | 6 | ||||
| -rw-r--r-- | src/input/model.rs | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs index 21893303..8108bf99 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -9,8 +9,10 @@ pub use encode::{ }; #[cfg(not(windows))] pub use model::ime_compatible_keyboard_enhancement_flags; +#[cfg(any(unix, test))] +pub use model::MouseProtocolMode; pub use model::{ - host_modify_other_keys_mode, KeyIdentity, KeyboardProtocol, MouseProtocolEncoding, - MouseProtocolMode, TerminalKey, TextCommit, WindowsKeyRecord, + host_modify_other_keys_mode, KeyIdentity, KeyboardProtocol, MouseProtocolEncoding, TerminalKey, + TextCommit, WindowsKeyRecord, }; pub use parse::parse_terminal_key_sequence; diff --git a/src/input/model.rs b/src/input/model.rs index 21252d2d..cada5506 100644 --- a/src/input/model.rs +++ b/src/input/model.rs @@ -295,6 +295,7 @@ impl KeyboardProtocol { } } +#[cfg(any(unix, test))] #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] #[serde(rename_all = "snake_case")] pub enum MouseProtocolMode { @@ -305,7 +306,9 @@ pub enum MouseProtocolMode { AnyMotion, } +#[cfg(any(unix, test))] impl MouseProtocolMode { + #[cfg(test)] pub fn reporting_enabled(self) -> bool { self != Self::None } |
