0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

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.
This commit is contained in:
Bram Moolenaar
2021-04-19 16:48:48 +02:00
parent e8209b91b9
commit 4c13721482
11 changed files with 1476 additions and 1185 deletions

View File

@@ -2069,6 +2069,9 @@ vim_regsub_both(
}
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);