From c0fb777ed7c7950c6a2f397113c1842c2e679306 Mon Sep 17 00:00:00 2001 From: Ogulcan Celik Date: Fri, 24 Jul 2026 04:00:13 +0300 Subject: fix: report truncated pane reads refs #1717 --- src/terminal/runtime.rs | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'src/terminal/runtime.rs') diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs index 0241f984..cd6f4211 100644 --- a/src/terminal/runtime.rs +++ b/src/terminal/runtime.rs @@ -334,16 +334,31 @@ impl TerminalRuntime { self.0.recent_text(lines) } - pub fn recent_ansi(&self, lines: usize) -> String { - self.0.recent_ansi(lines) + pub(crate) fn recent_text_snapshot(&self, lines: usize) -> crate::pane::TerminalReadSnapshot { + self.0.recent_text_snapshot(lines) } + pub(crate) fn recent_ansi_snapshot(&self, lines: usize) -> crate::pane::TerminalReadSnapshot { + self.0.recent_ansi_snapshot(lines) + } + + #[cfg(test)] pub fn recent_unwrapped_text(&self, lines: usize) -> String { - self.0.recent_unwrapped_text(lines) + self.0.recent_unwrapped_text_snapshot(lines).text } - pub fn recent_unwrapped_ansi(&self, lines: usize) -> String { - self.0.recent_unwrapped_ansi(lines) + pub(crate) fn recent_unwrapped_text_snapshot( + &self, + lines: usize, + ) -> crate::pane::TerminalReadSnapshot { + self.0.recent_unwrapped_text_snapshot(lines) + } + + pub(crate) fn recent_unwrapped_ansi_snapshot( + &self, + lines: usize, + ) -> crate::pane::TerminalReadSnapshot { + self.0.recent_unwrapped_ansi_snapshot(lines) } pub fn snapshot_history(&self) -> Option { -- cgit v1.2.3