Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
vim: Fix incorrect escaping parenthesis of replacement string (#29555)
Hilda2475a9ed164b1a
diff --git a/crates/vim/src/normal/search.rs b/crates/vim/src/normal/search.rsindex da8f65c1cf2..2f723198b6e 100644--- a/crates/vim/src/normal/search.rs+++ b/crates/vim/src/normal/search.rs@@ -542,7 +542,7 @@ impl Replacement {if phase == 1 && c.is_ascii_digit() {buffer.push('$')// unescape escaped parens- } else if phase == 0 && c == '(' || c == ')' {+ } else if phase == 0 && (c == '(' || c == ')') {} else if c != delimiter {buffer.push('\\')}@@ -561,7 +561,7 @@ impl Replacement {}} else {// escape unescaped parens- if phase == 0 && c == '(' || c == ')' {+ if phase == 0 && (c == '(' || c == ')') {buffer.push('\\')}buffer.push(c)