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.
This commit is contained in:
@@ -700,7 +700,11 @@ impl BufferSearchBar {
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
) -> 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));
|
||||
|
||||
Reference in New Issue
Block a user