Implement "open in terminal" (#3888)
This commit is contained in:
@@ -971,25 +971,16 @@ impl ProjectPanel {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn open_in_terminal(&mut self, _: &OpenInTerminal, _cx: &mut ViewContext<Self>) {
|
fn open_in_terminal(&mut self, _: &OpenInTerminal, cx: &mut ViewContext<Self>) {
|
||||||
todo!()
|
if let Some((worktree, entry)) = self.selected_entry(cx) {
|
||||||
// if let Some((worktree, entry)) = self.selected_entry(cx) {
|
let path = worktree.abs_path().join(&entry.path);
|
||||||
// let window = cx.window();
|
cx.dispatch_action(
|
||||||
// let view_id = cx.view_id();
|
workspace::OpenTerminal {
|
||||||
// let path = worktree.abs_path().join(&entry.path);
|
working_directory: path,
|
||||||
|
}
|
||||||
// cx.app_context()
|
.boxed_clone(),
|
||||||
// .spawn(|mut cx| async move {
|
)
|
||||||
// window.dispatch_action(
|
}
|
||||||
// view_id,
|
|
||||||
// &workspace::OpenTerminal {
|
|
||||||
// working_directory: path,
|
|
||||||
// },
|
|
||||||
// &mut cx,
|
|
||||||
// );
|
|
||||||
// })
|
|
||||||
// .detach();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn new_search_in_directory(
|
pub fn new_search_in_directory(
|
||||||
|
|||||||
Reference in New Issue
Block a user