mirror of
https://github.com/sxyazi/yazi.git
synced 2024-12-01 01:36:32 +03:00
fix: regression that caused TUI tearing when previewing an image
This commit is contained in:
parent
bdbd552457
commit
64c6cdf072
@ -24,6 +24,10 @@ impl Adaptor {
|
||||
path = cache.as_path();
|
||||
}
|
||||
|
||||
if IMAGE_SHOWN.swap(true, Ordering::Relaxed) {
|
||||
Self::image_hide(rect).ok();
|
||||
}
|
||||
|
||||
match PREVIEW.adaptor {
|
||||
PreviewAdaptor::Kitty => Kitty::image_show(path, rect).await,
|
||||
PreviewAdaptor::Iterm2 => Iterm2::image_show(path, rect).await,
|
||||
@ -31,9 +35,7 @@ impl Adaptor {
|
||||
_ => Ok(if let Some(tx) = &*UEBERZUG {
|
||||
tx.send(Some((path.to_path_buf(), rect)))?;
|
||||
}),
|
||||
}?;
|
||||
|
||||
Ok(IMAGE_SHOWN.store(true, Ordering::Relaxed))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn image_hide(rect: Rect) -> Result<()> {
|
||||
|
Loading…
Reference in New Issue
Block a user