From a03306fd01bbc4989f03a31127d97901dcb8ecf8 Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 22 Dec 2023 18:37:24 +0200 Subject: [PATCH] Fix enter, tab and shift-tab behavior in project search 2 --- crates/search2/src/project_search.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/crates/search2/src/project_search.rs b/crates/search2/src/project_search.rs index 3e245ed72d4a9e8523b281ef79ee58387b2ad5bd..bc23f675672c2de7d5ee862342057d5a84765231 100644 --- a/crates/search2/src/project_search.rs +++ b/crates/search2/src/project_search.rs @@ -1730,12 +1730,15 @@ impl Render for ProjectSearchBar { .on_action(cx.listener(|this, _: &ActivateSemanticMode, cx| { this.activate_search_mode(SearchMode::Semantic, cx) })) - .on_action(cx.listener(|this, action, cx| { + .capture_action(cx.listener(|this, action, cx| { this.tab(action, cx); + cx.stop_propagation(); })) - .on_action(cx.listener(|this, action, cx| { + .capture_action(cx.listener(|this, action, cx| { this.tab_previous(action, cx); + cx.stop_propagation(); })) + .on_action(cx.listener(|this, action, cx| this.confirm(action, cx))) .on_action(cx.listener(|this, action, cx| { this.cycle_mode(action, cx); }))