open picker (#14524)
Release Notes: - linux: Added a fallback Open picker for when XDG is not working - Added a new setting `use_system_path_prompts` (default true) that can be disabled to use Zed's builtin keyboard-driven prompts. --------- Co-authored-by: Max <max@zed.dev>
This commit is contained in:
parent
da33aac156
commit
abc5abcd8b
14 changed files with 453 additions and 69 deletions
|
@ -197,14 +197,12 @@ pub struct NewPathDelegate {
|
|||
}
|
||||
|
||||
impl NewPathPrompt {
|
||||
pub(crate) fn register(workspace: &mut Workspace, cx: &mut ViewContext<Workspace>) {
|
||||
if workspace.project().read(cx).is_remote() {
|
||||
workspace.set_prompt_for_new_path(Box::new(|workspace, cx| {
|
||||
let (tx, rx) = futures::channel::oneshot::channel();
|
||||
Self::prompt_for_new_path(workspace, tx, cx);
|
||||
rx
|
||||
}));
|
||||
}
|
||||
pub(crate) fn register(workspace: &mut Workspace, _cx: &mut ViewContext<Workspace>) {
|
||||
workspace.set_prompt_for_new_path(Box::new(|workspace, cx| {
|
||||
let (tx, rx) = futures::channel::oneshot::channel();
|
||||
Self::prompt_for_new_path(workspace, tx, cx);
|
||||
rx
|
||||
}));
|
||||
}
|
||||
|
||||
fn prompt_for_new_path(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue