Ensure search input always has regex language synced with search_options state (#25811)
Follow-up to https://github.com/zed-industries/zed/pull/25797 Release Notes: - N/A
This commit is contained in:
parent
22220ed32e
commit
5740fec9d5
@ -924,7 +924,7 @@ impl BufferSearchBar {
|
|||||||
query_buffer.edit([(0..len, query)], None, cx);
|
query_buffer.edit([(0..len, query)], None, cx);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
self.search_options = options;
|
self.set_search_options(options, cx);
|
||||||
self.clear_matches(window, cx);
|
self.clear_matches(window, cx);
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
@ -978,6 +978,7 @@ impl BufferSearchBar {
|
|||||||
|
|
||||||
pub fn set_search_options(&mut self, search_options: SearchOptions, cx: &mut Context<Self>) {
|
pub fn set_search_options(&mut self, search_options: SearchOptions, cx: &mut Context<Self>) {
|
||||||
self.search_options = search_options;
|
self.search_options = search_options;
|
||||||
|
self.adjust_query_regex_language(cx);
|
||||||
cx.notify();
|
cx.notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -894,6 +894,7 @@ impl ProjectSearchView {
|
|||||||
editor.set_text(old_query.as_str(), window, cx);
|
editor.set_text(old_query.as_str(), window, cx);
|
||||||
});
|
});
|
||||||
search_view.search_options = SearchOptions::from_query(&old_query);
|
search_view.search_options = SearchOptions::from_query(&old_query);
|
||||||
|
search_view.adjust_query_regex_language(cx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
new_query
|
new_query
|
||||||
|
Loading…
Reference in New Issue
Block a user