Introduce reveal_path in Platform
And implement it for MacPlatform, and instead of using an external process to run `open`, use the NSWorkspace selectFile instance method.
This commit is contained in:
parent
9143790602
commit
015b8db1c3
5 changed files with 19 additions and 14 deletions
|
@ -791,8 +791,9 @@ impl ProjectPanel {
|
|||
}
|
||||
|
||||
fn reveal_in_finder(&mut self, _: &RevealInFinder, cx: &mut ViewContext<Self>) {
|
||||
if let Some((_worktree, entry)) = self.selected_entry(cx) {
|
||||
util::reveal_in_finder(&entry.path);
|
||||
if let Some((worktree, entry)) = self.selected_entry(cx) {
|
||||
cx.platform()
|
||||
.reveal_path(&worktree.abs_path().join(&entry.path));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue