diff --git a/Cargo.lock b/Cargo.lock index bdeac22f9..e43caf50a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -406,9 +406,9 @@ dependencies = [ [[package]] name = "clap_complete" -version = "4.5.19" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eddf1c00919f37952199f7dbc834789cd33356ed10278ee40c8572b8fb88cf2" +checksum = "531d7959c5bbb6e266cecdd0f20213639c3a5c3e4d615f97db87661745f781ff" dependencies = [ "clap", ] diff --git a/yazi-boot/Cargo.toml b/yazi-boot/Cargo.toml index 85e4f402f..8b8e03b42 100644 --- a/yazi-boot/Cargo.toml +++ b/yazi-boot/Cargo.toml @@ -20,7 +20,7 @@ serde = { workspace = true } [build-dependencies] clap = { workspace = true } -clap_complete = "4.5.19" +clap_complete = "4.5.23" clap_complete_fig = "4.5.2" clap_complete_nushell = "4.5.3" vergen-gitcl = { version = "1.0.0", features = [ "build" ] } diff --git a/yazi-cli/Cargo.toml b/yazi-cli/Cargo.toml index dbaab9f8a..114f2784d 100644 --- a/yazi-cli/Cargo.toml +++ b/yazi-cli/Cargo.toml @@ -28,7 +28,7 @@ yazi-shared = { path = "../yazi-shared", version = "0.3.1" } # External build dependencies anyhow = { workspace = true } clap = { workspace = true } -clap_complete = "4.5.19" +clap_complete = "4.5.23" clap_complete_fig = "4.5.2" clap_complete_nushell = "4.5.3" serde_json = { workspace = true } diff --git a/yazi-core/src/manager/commands/peek.rs b/yazi-core/src/manager/commands/peek.rs index 0d8b71e21..0efdd7fb7 100644 --- a/yazi-core/src/manager/commands/peek.rs +++ b/yazi-core/src/manager/commands/peek.rs @@ -56,6 +56,9 @@ impl Manager { } let mime = self.mimetype.get(&hovered.url).cloned().unwrap_or_default(); - self.active_mut().preview.go(hovered, &mime, opt.force); + if !mime.is_empty() { + // Wait till mimetype is resolved to avoid flickering + self.active_mut().preview.go(hovered, &mime, opt.force); + } } }