aboutsummaryrefslogtreecommitdiff
path: root/src/pane
diff options
context:
space:
mode:
authorakbash <akbash@herdr.dev>2026-08-09 14:50:11 +0300
committerGitHub <noreply@github.com>2026-08-09 14:50:11 +0300
commite7c38ab37f967d16e2eacdb0bbde2d933a332057 (patch)
tree3df712c664e7e33f192d8ce40a99fb0d06d51494 /src/pane
parentd277d2f83b749a38c90eb96ef7cd329cc2171cd7 (diff)
perf(ui): avoid full pane mode reads for scrollbars (#2554)
Diffstat (limited to 'src/pane')
-rw-r--r--src/pane/terminal.rs10
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;