mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
83d00ac307
commit
c1fedcf49a
1 changed files with 6 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ impl App {
|
|||
return Ok(());
|
||||
};
|
||||
|
||||
COLLISION.store(false, Ordering::Relaxed);
|
||||
let collision = COLLISION.swap(false, Ordering::Relaxed);
|
||||
let frame = term.draw(|f| {
|
||||
yazi_plugin::scope(&self.cx, |_| {
|
||||
f.render_widget(Root::new(&self.cx), f.size());
|
||||
|
|
@ -92,6 +92,11 @@ impl App {
|
|||
}
|
||||
})?;
|
||||
if !COLLISION.load(Ordering::Relaxed) {
|
||||
if collision {
|
||||
// Reload preview if collision is resolved
|
||||
self.cx.manager.active_mut().preview.reset();
|
||||
self.cx.manager.peek(0);
|
||||
}
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue