Search woes (#6698)
Fixes #6441 Release Notes: - Fixed "SelectNextMatch", "SelectPrevMatch" and "SelectAllMatches" actions not working when search bar is not visible. - Fixed "SelectPrevMatch" not being bound in project search. --------- Co-authored-by: Kirill <kirill@zed.dev>
This commit is contained in:
parent
dd3ec15acc
commit
062288dea5
3 changed files with 209 additions and 197 deletions
|
@ -88,6 +88,12 @@ pub fn init(cx: &mut AppContext) {
|
|||
register_workspace_action(workspace, move |search_bar, action: &CycleMode, cx| {
|
||||
search_bar.cycle_mode(action, cx)
|
||||
});
|
||||
register_workspace_action(
|
||||
workspace,
|
||||
move |search_bar, action: &SelectPrevMatch, cx| {
|
||||
search_bar.select_prev_match(action, cx)
|
||||
},
|
||||
);
|
||||
register_workspace_action(
|
||||
workspace,
|
||||
move |search_bar, action: &SelectNextMatch, cx| {
|
||||
|
@ -1550,7 +1556,7 @@ impl ProjectSearchBar {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn select_next_match(&mut self, _: &SelectNextMatch, cx: &mut ViewContext<Self>) {
|
||||
fn select_next_match(&mut self, _: &SelectNextMatch, cx: &mut ViewContext<Self>) {
|
||||
if let Some(search) = self.active_project_search.as_ref() {
|
||||
search.update(cx, |this, cx| {
|
||||
this.select_match(Direction::Next, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue