Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: accommodate all hover events for DDS #1187

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions yazi-core/src/manager/commands/hover.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::collections::HashSet;

use yazi_dds::Pubsub;
use yazi_shared::{event::{Cmd, Data}, fs::Url, render};

use crate::manager::Manager;
Expand Down Expand Up @@ -42,5 +43,8 @@ impl Manager {
}
}
self.watcher.watch(to_watch);

// Publish through DDS
Pubsub::pub_from_hover(self.active().idx, self.hovered().map(|h| &h.url));
}
}
2 changes: 0 additions & 2 deletions yazi-core/src/tab/commands/arrow.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use yazi_dds::Pubsub;
use yazi_proxy::ManagerProxy;
use yazi_shared::{event::{Cmd, Data}, render};

Expand Down Expand Up @@ -44,7 +43,6 @@ impl Tab {
}
}

Pubsub::pub_from_hover(self.idx, self.current.hovered().map(|h| &h.url));
ManagerProxy::hover(None);
render!();
}
Expand Down