Restore the ability to navigate into project search input with the keyboard (#20579)
This commit is contained in:
parent
56cf32cb91
commit
3f224274da
2 changed files with 7 additions and 3 deletions
|
@ -657,6 +657,7 @@ impl BufferSearchBar {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
cx.propagate();
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
use crate::{
|
use crate::{
|
||||||
BufferSearchBar, FocusSearch, NextHistoryQuery, PreviousHistoryQuery, ReplaceAll, ReplaceNext,
|
buffer_search::Deploy, BufferSearchBar, FocusSearch, NextHistoryQuery, PreviousHistoryQuery,
|
||||||
SearchOptions, SelectNextMatch, SelectPrevMatch, ToggleCaseSensitive, ToggleIncludeIgnored,
|
ReplaceAll, ReplaceNext, SearchOptions, SelectNextMatch, SelectPrevMatch, ToggleCaseSensitive,
|
||||||
ToggleRegex, ToggleReplace, ToggleWholeWord,
|
ToggleIncludeIgnored, ToggleRegex, ToggleReplace, ToggleWholeWord,
|
||||||
};
|
};
|
||||||
use collections::{HashMap, HashSet};
|
use collections::{HashMap, HashSet};
|
||||||
use editor::{
|
use editor::{
|
||||||
|
@ -58,6 +58,9 @@ impl Global for ActiveSettings {}
|
||||||
pub fn init(cx: &mut AppContext) {
|
pub fn init(cx: &mut AppContext) {
|
||||||
cx.set_global(ActiveSettings::default());
|
cx.set_global(ActiveSettings::default());
|
||||||
cx.observe_new_views(|workspace: &mut Workspace, _cx| {
|
cx.observe_new_views(|workspace: &mut Workspace, _cx| {
|
||||||
|
register_workspace_action(workspace, move |search_bar, _: &Deploy, cx| {
|
||||||
|
search_bar.focus_search(cx);
|
||||||
|
});
|
||||||
register_workspace_action(workspace, move |search_bar, _: &FocusSearch, cx| {
|
register_workspace_action(workspace, move |search_bar, _: &FocusSearch, cx| {
|
||||||
search_bar.focus_search(cx);
|
search_bar.focus_search(cx);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue