Skip to content

Commit 5cfcab3

Browse files
authored
fix: missing a hover after reordering from an external plugin (#2072)
1 parent f017699 commit 5cfcab3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

yazi-config/preset/yazi-default.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,7 @@ previewers = [
132132
{ mime = "application/pdf", run = "pdf" },
133133
# Archive
134134
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
135-
{ mime = "application/{debian-package,redhat-package-manager,rpm}", run = "archive" },
136-
{ mime = "application/debian.binary-package", run = "archive" },
137-
{ mime = "application/android.package-archive", run = "archive" },
135+
{ mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" },
138136
{ name = "*.{AppImage,appimage}", run = "archive" },
139137
# Virtual Disk / Disk Image
140138
{ mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" },

yazi-core/src/tab/commands/sort.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use yazi_shared::event::CmdCow;
77
use crate::{tab::Tab, tasks::Tasks};
88

99
impl Tab {
10-
pub fn sort(&mut self, mut c: CmdCow, tasks: &Tasks) {
10+
pub fn sort(&mut self, c: CmdCow, tasks: &Tasks) {
1111
let pref = &mut self.pref;
12-
if let Some(by) = c.take_first_str() {
13-
pref.sort_by = SortBy::from_str(&by).unwrap_or_default();
12+
if let Some(by) = c.first_str() {
13+
pref.sort_by = SortBy::from_str(by).unwrap_or_default();
1414
}
1515

1616
pref.sort_reverse = c.maybe_bool("reverse").unwrap_or(pref.sort_reverse);
@@ -19,6 +19,8 @@ impl Tab {
1919
pref.sort_translit = c.maybe_bool("translit").unwrap_or(pref.sort_translit);
2020

2121
self.apply_files_attrs();
22+
23+
ManagerProxy::hover(None, self.id);
2224
ManagerProxy::update_paged();
2325

2426
tasks.prework_sorted(&self.current.files);

0 commit comments

Comments
 (0)