patch 8.2.3475: expression register set by not executed put command
Problem: Expression register set by not executed put command.
Solution: Do not set the register if the command is skipped. (closes #8909)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 617de6f..2c55e67 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -2382,9 +2382,12 @@
// for '=' register: accept the rest of the line as an expression
if (ea.arg[-1] == '=' && ea.arg[0] != NUL)
{
- set_expr_line(vim_strsave(ea.arg), &ea);
+ if (!ea.skip)
+ {
+ set_expr_line(vim_strsave(ea.arg), &ea);
+ did_set_expr_line = TRUE;
+ }
ea.arg += STRLEN(ea.arg);
- did_set_expr_line = TRUE;
}
#endif
ea.arg = skipwhite(ea.arg);