Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Avoid trailing separators in file finder

Kirill Bulatovaf6f4678900f
diff --git a/crates/file_finder2/src/file_finder.rs b/crates/file_finder2/src/file_finder.rs
index 8ca7d46f296..69deba6d2c0 100644
--- a/crates/file_finder2/src/file_finder.rs
+++ b/crates/file_finder2/src/file_finder.rs
@@ -546,7 +546,7 @@ impl PickerDelegate for FileFinderDelegate {
fn separators_after_indices(&self) -> Vec<usize> {
let history_items = self.matches.history.len();
- if history_items == 0 {
+ if history_items == 0 || self.matches.search.is_empty() {
Vec::new()
} else {
vec![history_items - 1]