patch 8.2.2784: Vim9: cannot use \=expr in :substitute
Problem: Vim9: cannot use \=expr in :substitute.
Solution: Compile the expression into instructions and execute them when
invoked.
diff --git a/src/regexp.c b/src/regexp.c
index 9d2d441..e372dd4 100644
--- a/src/regexp.c
+++ b/src/regexp.c
@@ -2069,6 +2069,9 @@
}
clear_tv(&rettv);
}
+ else if (substitute_instr != NULL)
+ // Execute instructions from ISN_SUBSTITUTE.
+ eval_result = exe_substitute_instr();
else
eval_result = eval_to_string(source + 2, TRUE);