Allow buffer search in project search (#23819)
Closes #13437 Closes #19993 Release Notes: - Allow searching within the results of a project search - vim: Fix `/`/`?`, `n`/`N`, `gn`/`gN`,`*`/`#` in project search results --------- Co-authored-by: Nico <nico.lehmann@gmail.com>
This commit is contained in:
parent
e1af35aa15
commit
f2b3f3a9ab
10 changed files with 191 additions and 105 deletions
|
@ -421,6 +421,9 @@ impl Item for ProjectSearchView {
|
|||
None
|
||||
}
|
||||
}
|
||||
fn as_searchable(&self, _: &Entity<Self>) -> Option<Box<dyn SearchableItemHandle>> {
|
||||
Some(Box::new(self.results_editor.clone()))
|
||||
}
|
||||
|
||||
fn deactivated(&mut self, window: &mut Window, cx: &mut Context<Self>) {
|
||||
self.results_editor
|
||||
|
@ -736,6 +739,7 @@ impl ProjectSearchView {
|
|||
let mut editor =
|
||||
Editor::for_multibuffer(excerpts, Some(project.clone()), true, window, cx);
|
||||
editor.set_searchable(false);
|
||||
editor.set_in_project_search(true);
|
||||
editor
|
||||
});
|
||||
subscriptions.push(cx.observe(&results_editor, |_, _, cx| cx.emit(ViewEvent::UpdateTab)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue