Skip to content

Commit

Permalink
fix: missing a hover after reordering from an external plugin (#2072)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxyazi authored Dec 20, 2024
1 parent f017699 commit 5cfcab3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 1 addition & 3 deletions yazi-config/preset/yazi-default.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,7 @@ previewers = [
{ mime = "application/pdf", run = "pdf" },
# Archive
{ mime = "application/{zip,rar,7z*,tar,gzip,xz,zstd,bzip*,lzma,compress,archive,cpio,arj,xar,ms-cab*}", run = "archive" },
{ mime = "application/{debian-package,redhat-package-manager,rpm}", run = "archive" },
{ mime = "application/debian.binary-package", run = "archive" },
{ mime = "application/android.package-archive", run = "archive" },
{ mime = "application/{debian*-package,redhat-package-manager,rpm,android.package-archive}", run = "archive" },
{ name = "*.{AppImage,appimage}", run = "archive" },
# Virtual Disk / Disk Image
{ mime = "application/{iso9660-image,qemu-disk,ms-wim,apple-diskimage}", run = "archive" },
Expand Down
8 changes: 5 additions & 3 deletions yazi-core/src/tab/commands/sort.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ use yazi_shared::event::CmdCow;
use crate::{tab::Tab, tasks::Tasks};

impl Tab {
pub fn sort(&mut self, mut c: CmdCow, tasks: &Tasks) {
pub fn sort(&mut self, c: CmdCow, tasks: &Tasks) {
let pref = &mut self.pref;
if let Some(by) = c.take_first_str() {
pref.sort_by = SortBy::from_str(&by).unwrap_or_default();
if let Some(by) = c.first_str() {
pref.sort_by = SortBy::from_str(by).unwrap_or_default();
}

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

self.apply_files_attrs();

ManagerProxy::hover(None, self.id);
ManagerProxy::update_paged();

tasks.prework_sorted(&self.current.files);
Expand Down

0 comments on commit 5cfcab3

Please sign in to comment.