Implement "open in terminal" (#3888)

This commit is contained in:
Conrad Irwin
2024-01-04 10:35:17 -07:00
committed by GitHub
+10 -19
View File
@@ -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(