Focus filters when enabled

This commit is contained in:
Piotr Osiewicz
2023-08-04 02:33:48 +02:00
parent c14a99d8fa
commit 13a6b65a35
+5
View File
@@ -1507,6 +1507,11 @@ impl ProjectSearchBar {
if let Some(search_view) = self.active_project_search.as_ref() {
search_view.update(cx, |search_view, cx| {
search_view.filters_enabled = !search_view.filters_enabled;
if search_view.filters_enabled {
cx.focus(&search_view.included_files_editor);
} else {
cx.focus(&search_view.query_editor);
}
search_view
.included_files_editor
.update(cx, |_, cx| cx.notify());