diff options
| author | akbash <akbash@herdr.dev> | 2026-08-09 14:50:11 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-08-09 14:50:11 +0300 |
| commit | e7c38ab37f967d16e2eacdb0bbde2d933a332057 (patch) | |
| tree | 3df712c664e7e33f192d8ce40a99fb0d06d51494 /src/pane | |
| parent | d277d2f83b749a38c90eb96ef7cd329cc2171cd7 (diff) | |
perf(ui): avoid full pane mode reads for scrollbars (#2554)
Diffstat (limited to 'src/pane')
| -rw-r--r-- | src/pane/terminal.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/pane/terminal.rs b/src/pane/terminal.rs index a6e5c1da..1c10726c 100644 --- a/src/pane/terminal.rs +++ b/src/pane/terminal.rs @@ -388,6 +388,10 @@ impl PaneTerminal { self.ghostty.input_state() } + pub fn alternate_screen_active(&self) -> bool { + self.ghostty.alternate_screen_active() + } + pub fn wheel_routing(&self) -> Option<crate::pane::WheelRouting> { self.ghostty.wheel_routing() } @@ -1665,6 +1669,12 @@ impl GhosttyPaneTerminal { core.kitty_keyboard.replay_ansi() } + pub fn alternate_screen_active(&self) -> bool { + self.core.lock().is_ok_and(|core| { + core.terminal.active_screen().ok() == Some(crate::ghostty::ActiveScreen::Alternate) + }) + } + pub fn input_state(&self) -> Option<InputState> { let Ok(core) = self.core.lock() else { return None; |
