mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-20 02:47:34 +03:00
Revert "Focus Project Search query editor always when deployed"
This commit is contained in:
parent
c4e0307c0b
commit
c4203868ea
@ -170,7 +170,11 @@ impl View for ProjectSearchView {
|
|||||||
.insert(self.model.read(cx).project.downgrade(), handle)
|
.insert(self.model.read(cx).project.downgrade(), handle)
|
||||||
});
|
});
|
||||||
|
|
||||||
self.focus_query_editor(cx);
|
if self.model.read(cx).match_ranges.is_empty() {
|
||||||
|
cx.focus(&self.query_editor);
|
||||||
|
} else {
|
||||||
|
self.focus_results_editor(cx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -394,7 +398,6 @@ impl ProjectSearchView {
|
|||||||
|
|
||||||
if let Some(existing) = existing {
|
if let Some(existing) = existing {
|
||||||
workspace.activate_item(&existing, cx);
|
workspace.activate_item(&existing, cx);
|
||||||
existing.update(cx, |existing, cx| existing.focus_query_editor(cx));
|
|
||||||
} else {
|
} else {
|
||||||
let model = cx.add_model(|cx| ProjectSearch::new(workspace.project().clone(), cx));
|
let model = cx.add_model(|cx| ProjectSearch::new(workspace.project().clone(), cx));
|
||||||
workspace.add_item(
|
workspace.add_item(
|
||||||
|
Loading…
Reference in New Issue
Block a user