editor: Use less memory when replacing literal strings (#46092)
Found while profiling #38927
When the query is not a regex, the same replacement can be applied to
all matches. Previously, `replacement_for` allocated a new String on
every call, while `replacement` returns a reference.
Release Notes:
- N/A
---------
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
f35e67894dMarco Mihai Condrache committed on 1/5/2026, 11:14:31 PM· committed by GitHubparent778609f