Improve file finder by ignoring spaces in query (#7068)
Release Notes: - Changed file finder to ignore spaces in queries ([#5324 ](https://github.com/zed-industries/zed/issues/5324)).  --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This commit is contained in:
parent
135bca262c
commit
5333eff0e4
2 changed files with 2 additions and 0 deletions
|
@ -666,6 +666,7 @@ impl PickerDelegate for FileFinderDelegate {
|
||||||
raw_query: String,
|
raw_query: String,
|
||||||
cx: &mut ViewContext<Picker<Self>>,
|
cx: &mut ViewContext<Picker<Self>>,
|
||||||
) -> Task<()> {
|
) -> Task<()> {
|
||||||
|
let raw_query = raw_query.replace(" ", "");
|
||||||
let raw_query = raw_query.trim();
|
let raw_query = raw_query.trim();
|
||||||
if raw_query.is_empty() {
|
if raw_query.is_empty() {
|
||||||
let project = self.project.read(cx);
|
let project = self.project.read(cx);
|
||||||
|
|
|
@ -53,6 +53,7 @@ async fn test_matching_paths(cx: &mut TestAppContext) {
|
||||||
" bandana ",
|
" bandana ",
|
||||||
" ndan ",
|
" ndan ",
|
||||||
" band ",
|
" band ",
|
||||||
|
"a bandana",
|
||||||
] {
|
] {
|
||||||
picker
|
picker
|
||||||
.update(cx, |picker, cx| {
|
.update(cx, |picker, cx| {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue