Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Python: Improved the `Add Virtual Environment` path browser to start at the workspace root (#47988)
Joseph T. Lyons9aa71ddbcee0
diff --git a/crates/toolchain_selector/src/toolchain_selector.rs b/crates/toolchain_selector/src/toolchain_selector.rsindex 5d2e63f9737..f7b451e876c 100644--- a/crates/toolchain_selector/src/toolchain_selector.rs+++ b/crates/toolchain_selector/src/toolchain_selector.rs@@ -110,7 +110,14 @@ impl AddToolchainState {.context("Could not find worktree")?;Ok(cx.new(|cx| {let (lister, rx) = Self::create_path_browser_delegate(project.clone(), cx);- let picker = cx.new(|cx| Picker::uniform_list(lister, window, cx));+ let path_style = project.read(cx).path_style(cx);+ let picker = cx.new(|cx| {+ let picker = Picker::uniform_list(lister, window, cx);+ let mut worktree_root = worktree_root_path.to_string_lossy().into_owned();+ worktree_root.push_str(path_style.primary_separator());+ picker.set_query(&worktree_root, window, cx);+ picker+ });Self {state: AddState::Path {