mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
fix: reset image rendering and skip peeking if the TUI in the background
This commit is contained in:
parent
60cfa7dba9
commit
d1503654a7
1 changed files with 5 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use yazi_proxy::HIDER;
|
||||
use yazi_shared::{event::{Cmd, Data}, fs::Url};
|
||||
|
||||
use crate::manager::Manager;
|
||||
|
|
@ -27,6 +28,10 @@ impl From<bool> for Opt {
|
|||
impl Manager {
|
||||
#[yazi_codegen::command]
|
||||
pub fn peek(&mut self, opt: Opt) {
|
||||
if HIDER.try_acquire().is_err() {
|
||||
return self.active_mut().preview.reset_image();
|
||||
}
|
||||
|
||||
let Some(hovered) = self.hovered().cloned() else {
|
||||
return self.active_mut().preview.reset();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue