From a5c69beabfc82d9c3f9563eb821139b2e0f3e14f Mon Sep 17 00:00:00 2001 From: Can Celik Date: Wed, 19 Aug 2026 04:43:28 +0300 Subject: 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 --- src/terminal/runtime.rs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'src/terminal/runtime.rs') diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs index 619c98a4..5051a46b 100644 --- a/src/terminal/runtime.rs +++ b/src/terminal/runtime.rs @@ -313,13 +313,33 @@ impl TerminalRuntime { /// Collects the complete terminal input-mode snapshot. /// - /// This performs multiple terminal queries and may format keyboard state. - /// Keep it out of render/layout and pane-scaled loops; add a narrow accessor - /// when only one terminal fact is needed. + /// This performs multiple terminal queries. Keep it out of render/layout + /// and pane-scaled loops; add a narrow accessor when one fact is needed. + #[cfg(test)] pub fn input_state(&self) -> Option { self.0.input_state() } + pub fn keyboard_report_all_requested(&self) -> bool { + self.0.keyboard_report_all_requested() + } + + pub fn bracketed_paste_enabled(&self) -> bool { + self.0.bracketed_paste_enabled() + } + + pub fn mouse_reporting_enabled(&self) -> bool { + self.0.mouse_reporting_enabled() + } + + pub fn sgr_pixel_mouse_enabled(&self) -> bool { + self.0.sgr_pixel_mouse_enabled() + } + + pub fn plain_page_keys_use_host_scrollback(&self) -> Option { + self.0.plain_page_keys_use_host_scrollback() + } + /// Reads only whether the alternate screen is active. pub fn alternate_screen_active(&self) -> bool { self.0.alternate_screen_active() -- cgit v1.2.3