diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-11 02:08:31 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-11 02:08:31 +0300 |
| commit | 6e7d415bcfc09bc5ad293cf1db919e9d17c28034 (patch) | |
| tree | e034d340d55006a91635a8ca29df75a14a2445c8 /src/terminal/runtime.rs | |
| parent | 58271459401fa461707c042f7f03867ddcfff3ea (diff) | |
fix: keep terminal snapshots consistent while scrolling (#3928)
refs #3900
Diffstat (limited to 'src/terminal/runtime.rs')
| -rw-r--r-- | src/terminal/runtime.rs | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/terminal/runtime.rs b/src/terminal/runtime.rs index 57d45b92..a409545b 100644 --- a/src/terminal/runtime.rs +++ b/src/terminal/runtime.rs @@ -411,22 +411,18 @@ impl TerminalRuntime { self.0.render(frame, area, show_cursor); } - pub(crate) fn collect_dirty_patch( + pub(crate) fn collect_dirty_patch_snapshot( &self, area_width: u16, area_height: u16, - ) -> crate::pane::TerminalDirtyPatchOutcome { - self.0.collect_dirty_patch(area_width, area_height) + ) -> Option<crate::pane::TerminalDirtyPatchSnapshot> { + self.0.collect_dirty_patch_snapshot(area_width, area_height) } pub fn visible_hyperlinks(&self, area: Rect) -> Vec<((u16, u16), String, String)> { self.0.visible_hyperlinks(area) } - pub(crate) fn kitty_graphics_may_have_placements(&self) -> bool { - self.0.kitty_graphics_may_have_placements() - } - pub fn kitty_image_placements_with_data_filter<F>( &self, needs_data: F, @@ -572,6 +568,13 @@ impl TerminalRuntime { #[cfg(test)] impl TerminalRuntime { + pub(crate) fn test_contend_during_dirty_collection( + &self, + bytes: Vec<u8>, + ) -> (std::sync::mpsc::Sender<()>, std::thread::JoinHandle<bool>) { + self.0.test_contend_during_dirty_collection(bytes) + } + pub(crate) fn test_with_channel(cols: u16, rows: u16) -> (Self, mpsc::Receiver<Bytes>) { let (runtime, rx) = crate::pane::PaneRuntime::test_with_channel(cols, rows); (Self(runtime), rx) |
