aboutsummaryrefslogtreecommitdiff
path: root/src/pane.rs
diff options
context:
space:
mode:
authorOgulcan Celik <ogulcancelik@gmail.com>2026-07-24 04:00:13 +0300
committerOgulcan Celik <ogulcancelik@gmail.com>2026-07-24 04:00:13 +0300
commitc0fb777ed7c7950c6a2f397113c1842c2e679306 (patch)
tree56a1b58314e292433946c1eed5c025abb832595f /src/pane.rs
parente608a75159fc5cca70485d83ffb8ee681c9da385 (diff)
fix: report truncated pane reads
refs #1717
Diffstat (limited to 'src/pane.rs')
-rw-r--r--src/pane.rs20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/pane.rs b/src/pane.rs
index ea6a13fd..45f4f720 100644
--- a/src/pane.rs
+++ b/src/pane.rs
@@ -41,8 +41,8 @@ use self::agent_detection::{
};
use self::terminal::{GhosttyPaneTerminal, PaneTerminal};
pub(crate) use self::terminal::{
- TerminalDirtyPatch, TerminalDirtyPatchOutcome, TerminalTextMatch, TerminalTextPoint,
- TerminalWordMotion,
+ TerminalDirtyPatch, TerminalDirtyPatchOutcome, TerminalReadSnapshot, TerminalTextMatch,
+ TerminalTextPoint, TerminalWordMotion,
};
pub use self::{
state::PaneState,
@@ -2552,18 +2552,26 @@ impl PaneRuntime {
self.terminal.recent_text(lines)
}
- pub fn recent_ansi(&self, lines: usize) -> String {
- self.terminal.recent_ansi(lines)
+ pub(crate) fn recent_text_snapshot(&self, lines: usize) -> TerminalReadSnapshot {
+ self.terminal.recent_text_snapshot(lines)
}
- pub fn recent_unwrapped_text(&self, lines: usize) -> String {
- self.terminal.recent_unwrapped_text(lines)
+ pub(crate) fn recent_ansi_snapshot(&self, lines: usize) -> TerminalReadSnapshot {
+ self.terminal.recent_ansi_snapshot(lines)
+ }
+
+ pub(crate) fn recent_unwrapped_text_snapshot(&self, lines: usize) -> TerminalReadSnapshot {
+ self.terminal.recent_unwrapped_text_snapshot(lines)
}
pub fn recent_unwrapped_ansi(&self, lines: usize) -> String {
self.terminal.recent_unwrapped_ansi(lines)
}
+ pub(crate) fn recent_unwrapped_ansi_snapshot(&self, lines: usize) -> TerminalReadSnapshot {
+ self.terminal.recent_unwrapped_ansi_snapshot(lines)
+ }
+
pub fn snapshot_history(&self) -> Option<String> {
let ansi = self.recent_unwrapped_ansi(usize::MAX);
(!ansi.trim().is_empty()).then_some(ansi)