diff options
Diffstat (limited to 'src/pane.rs')
| -rw-r--r-- | src/pane.rs | 20 |
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) |
