Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix buffer search options not resetting when dismissed after Vim mode search then reopened with `buffer: deploy search` (#25838)

Ben Kunkle694afd15c91f
diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs
index 75f31e68197..748662abf3a 100644
--- a/crates/search/src/buffer_search.rs
+++ b/crates/search/src/buffer_search.rs
@@ -814,7 +814,10 @@ impl BufferSearchBar {
self.configured_options =
SearchOptions::from_settings(&EditorSettings::get_global(cx).search);
- if self.dismissed && self.configured_options != self.default_options {
+ if self.dismissed
+ && (self.configured_options != self.default_options
+ || self.configured_options != self.search_options)
+ {
self.search_options = self.configured_options;
self.default_options = self.configured_options;
}