diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-31 16:21:53 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-31 16:22:04 +0300 |
| commit | bc1c052d1524749b3f24d91e83f120ca8b7f37c4 (patch) | |
| tree | d012bd4288bec8033bd8e9ab4e2086e8f110178e /src/pane/terminal.rs | |
| parent | 7db744ab4758df30f3e811ff9930646ec5f5970d (diff) | |
fix: read alternate-screen agent history
Diffstat (limited to 'src/pane/terminal.rs')
| -rw-r--r-- | src/pane/terminal.rs | 25 |
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() |
