Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
search: Add ToggleRegex for buffer search (#21799)
CharlesChen0823e7786354870d
diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rsindex 5b1a482f5e1..7d13ea1f2a0 100644--- a/crates/search/src/buffer_search.rs+++ b/crates/search/src/buffer_search.rs@@ -529,6 +529,11 @@ impl BufferSearchBar {this.toggle_whole_word(action, cx);}}));+ registrar.register_handler(ForDeployed(|this, action: &ToggleRegex, cx| {+ if this.supported_options().regex {+ this.toggle_regex(action, cx);+ }+ }));registrar.register_handler(ForDeployed(|this, action: &ToggleSelection, cx| {if this.supported_options().selection {this.toggle_selection(action, cx);