summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-02-18 15:31:53 +0000
committerBram Moolenaar <Bram@vim.org>2023-02-18 15:31:53 +0000
commitd114975b9bec30ec1486ebc70db6b802d0f1cfb8 (patch)
treecb4009d8f68184e58cae9adac10ac27ddbe70af3
parent0917e867632199883c07c2d7534f7091b1d12607 (diff)
downloadvim-git-d114975b9bec30ec1486ebc70db6b802d0f1cfb8.tar.gz
patch 9.0.1321: vimscript test fails where using {expr} syntaxv9.0.1321
Problem: vimscript test fails where using {expr} syntax. Solution: Only return FCERR_FAILED in call_user_func() for Vim9 script.
-rw-r--r--src/userfunc.c6
-rw-r--r--src/version.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/userfunc.c b/src/userfunc.c
index d5dd36989..c3b2a2535 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -3060,7 +3060,11 @@ call_user_func(
clear_tv(rettv);
rettv->v_type = VAR_NUMBER;
rettv->vval.v_number = -1;
- retval = FCERR_FAILED;
+
+ // In corner cases returning a "failed" value is not backwards
+ // compatible. Only do this for Vim9 script.
+ if (in_vim9script())
+ retval = FCERR_FAILED;
}
#ifdef FEAT_PROFILE
diff --git a/src/version.c b/src/version.c
index 20df49098..41822fdf4 100644
--- a/src/version.c
+++ b/src/version.c
@@ -696,6 +696,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1321,
+/**/
1320,
/**/
1319,