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:
Conrad Irwin 2025-01-31 00:13:46 -07:00 committed by GitHub
parent e1af35aa15
commit f2b3f3a9ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 191 additions and 105 deletions

View file

@ -728,6 +728,7 @@ pub struct Editor {
expect_bounds_change: Option<Bounds<Pixels>>,
tasks: BTreeMap<(BufferId, BufferRow), RunnableTasks>,
tasks_update_task: Option<Task<()>>,
in_project_search: bool,
previous_search_ranges: Option<Arc<[Range<Anchor>]>>,
breadcrumb_header: Option<String>,
focused_block: Option<FocusedBlock>,
@ -1426,6 +1427,7 @@ impl Editor {
],
tasks_update_task: None,
linked_edit_ranges: Default::default(),
in_project_search: false,
previous_search_ranges: None,
breadcrumb_header: None,
focused_block: None,
@ -1703,6 +1705,10 @@ impl Editor {
self.collaboration_hub = Some(hub);
}
pub fn set_in_project_search(&mut self, in_project_search: bool) {
self.in_project_search = in_project_search;
}
pub fn set_custom_context_menu(
&mut self,
f: impl 'static