diff options
Diffstat (limited to 'src/image/image_view.rs')
-rw-r--r-- | src/image/image_view.rs | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/image/image_view.rs b/src/image/image_view.rs index 583e2a7..9ec8708 100644 --- a/src/image/image_view.rs +++ b/src/image/image_view.rs @@ -73,14 +73,7 @@ impl ImageView { .or_else(|| styles.default.get_bg()) .unwrap_or(Color::AnsiValue(238)); - #[cfg(unix)] - if let Some(renderer) = crate::kitty::image_renderer() { - let mut renderer = renderer.lock().unwrap(); - renderer.print(w, &self.source_img, area)?; - for y in area.top..area.top + area.height { - w.queue(cursor::MoveTo(area.left, y))?; - fill_bg(w, area.width as usize, bg)?; - } + if crate::kitty::try_print_image(w, &self.source_img, area)? { return Ok(()); } |