Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
file finder: Fix `./` breaking new-path prompt (#15438)
Thorsten Ball2b0c60043dee
diff --git a/crates/file_finder/src/new_path_prompt.rs b/crates/file_finder/src/new_path_prompt.rsindex 206545f5b4a..2d5be8dae12 100644--- a/crates/file_finder/src/new_path_prompt.rs+++ b/crates/file_finder/src/new_path_prompt.rs@@ -248,7 +248,10 @@ impl PickerDelegate for NewPathDelegate {query: String,cx: &mut ViewContext<picker::Picker<Self>>,) -> gpui::Task<()> {- let query = query.trim().trim_start_matches('/');+ let query = query+ .trim()+ .trim_start_matches("./")+ .trim_start_matches('/');let (dir, suffix) = if let Some(index) = query.rfind('/') {let suffix = if index + 1 < query.len() {Some(query[index + 1..].to_string())