aboutsummaryrefslogtreecommitdiff
path: root/src/pane
diff options
context:
space:
mode:
Diffstat (limited to 'src/pane')
-rw-r--r--src/pane/terminal.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pane/terminal.rs b/src/pane/terminal.rs
index 76ab20d3..5a2180bf 100644
--- a/src/pane/terminal.rs
+++ b/src/pane/terminal.rs
@@ -369,6 +369,16 @@ impl PaneTerminal {
self.ghostty.wheel_routing()
}
+ pub(crate) fn screen_text_snapshot(
+ &self,
+ ) -> Option<(
+ crate::ghostty::ActiveScreen,
+ u16,
+ Vec<crate::ghostty::ScreenTextRow>,
+ )> {
+ self.ghostty.screen_text_snapshot()
+ }
+
pub fn cursor_state(&self) -> Option<TerminalCursorState> {
self.ghostty.cursor_state()
}
@@ -1714,6 +1724,21 @@ impl GhosttyPaneTerminal {
.filter(|bytes| !bytes.is_empty())
}
+ pub(crate) fn screen_text_snapshot(
+ &self,
+ ) -> Option<(
+ crate::ghostty::ActiveScreen,
+ u16,
+ Vec<crate::ghostty::ScreenTextRow>,
+ )> {
+ let core = self.core.lock().ok()?;
+ Some((
+ core.terminal.active_screen().ok()?,
+ core.terminal.cols().ok()?,
+ core.terminal.screen_text_rows().ok()?,
+ ))
+ }
+
pub fn visible_text(&self) -> String {
self.core
.lock()