From 34bf6ebba68cdbff01dfb4b3ff3c3a9c63240c08 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 23 Jul 2025 23:45:01 -0600 Subject: [PATCH] Disable auto-close in search (#35005) Currently if you type `\(`, it auto-closes to `\()` which is broken. It's arguably nice that if you type `(` it auto-closes to `()`, but I am much more likely to be looking for a function call `name\(` than to be starting a group in search. Release Notes: - search: Regex search will no longer try to close parenthesis automatically. --- crates/search/src/buffer_search.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs index c2590ec9b0..91b7fe488e 100644 --- a/crates/search/src/buffer_search.rs +++ b/crates/search/src/buffer_search.rs @@ -700,7 +700,11 @@ impl BufferSearchBar { window: &mut Window, cx: &mut Context, ) -> Self { - let query_editor = cx.new(|cx| Editor::single_line(window, cx)); + let query_editor = cx.new(|cx| { + let mut editor = Editor::single_line(window, cx); + editor.set_use_autoclose(false); + editor + }); cx.subscribe_in(&query_editor, window, Self::on_query_editor_event) .detach(); let replacement_editor = cx.new(|cx| Editor::single_line(window, cx));