summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/version.c2
-rw-r--r--src/vim9compile.c16
2 files changed, 11 insertions, 7 deletions
diff --git a/src/version.c b/src/version.c
index a31436bd0..7411bc0d8 100644
--- a/src/version.c
+++ b/src/version.c
@@ -755,6 +755,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1421,
+/**/
1420,
/**/
1419,
diff --git a/src/vim9compile.c b/src/vim9compile.c
index d327b4855..72c26ce46 100644
--- a/src/vim9compile.c
+++ b/src/vim9compile.c
@@ -3206,6 +3206,15 @@ compile_expr7(
case '9':
case '.': if (eval_number(arg, rettv, TRUE, FALSE) == FAIL)
return FAIL;
+ // Apply "-" and "+" just before the number now, right to
+ // left. Matters especially when "->" follows. Stops at
+ // '!'.
+ if (apply_leader(rettv, TRUE,
+ start_leader, &end_leader) == FAIL)
+ {
+ clear_tv(rettv);
+ return FAIL;
+ }
break;
/*
@@ -3344,13 +3353,6 @@ compile_expr7(
if (rettv->v_type != VAR_UNKNOWN && used_before == ppconst->pp_used)
{
- // apply the '-' and '+' before the constant, but not '!'
- if (apply_leader(rettv, TRUE, start_leader, &end_leader) == FAIL)
- {
- clear_tv(rettv);
- return FAIL;
- }
-
if (cctx->ctx_skip == SKIP_YES)
clear_tv(rettv);
else