aboutsummaryrefslogtreecommitdiff
path: root/src/pane/terminal.rs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-27 21:05:25 +0300
committerGitHub <noreply@github.com>2026-09-27 21:05:25 +0300
commit25aaa0b7e31b0b271ce72a69c9dd272d7ee83376 (patch)
tree9cb45a72cfaa973434532bdf4b872338d64da2f8 /src/pane/terminal.rs
parent2552d101afe46b8622a7695f38f6cd1766dd1afc (diff)
fix: keep offscreen kitty images loaded instead of resending them on scroll (#4686)
Diffstat (limited to 'src/pane/terminal.rs')
-rw-r--r--src/pane/terminal.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/pane/terminal.rs b/src/pane/terminal.rs
index 5eaddb21..8ac4bd1c 100644
--- a/src/pane/terminal.rs
+++ b/src/pane/terminal.rs
@@ -579,6 +579,10 @@ impl PaneTerminal {
.kitty_image_placements_with_data_filter(needs_data)
}
+ pub(crate) fn kitty_image_fingerprints(&self, image_ids: &[u32]) -> Vec<Option<u64>> {
+ self.ghostty.kitty_image_fingerprints(image_ids)
+ }
+
pub fn apply_host_terminal_theme(&self, theme: crate::terminal_theme::TerminalTheme) {
self.ghostty.apply_host_terminal_theme(theme);
}
@@ -2349,6 +2353,14 @@ impl GhosttyPaneTerminal {
.unwrap_or_default()
}
+ pub(crate) fn kitty_image_fingerprints(&self, image_ids: &[u32]) -> Vec<Option<u64>> {
+ self.core
+ .lock()
+ .ok()
+ .and_then(|core| core.terminal.kitty_image_fingerprints(image_ids).ok())
+ .unwrap_or_else(|| vec![None; image_ids.len()])
+ }
+
pub fn render(&self, frame: &mut Frame, area: Rect, show_cursor: bool) {
let Ok(mut core) = self.core.lock() else {
return;