diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-03-06 18:18:19 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-03-06 18:18:19 +0100 |
commit | a974953443775dd938cf9a8c195e3de9e4514f4f (patch) | |
tree | 39de4e660e57e4872aadd93c78155139d4a83920 /src | |
parent | 18062fcad648540369db5989aac297431119e037 (diff) | |
download | vim-git-a974953443775dd938cf9a8c195e3de9e4514f4f.tar.gz |
patch 8.2.2573: Vim9: using inalid pointer for error messagev8.2.2573
Problem: Vim9: using inalid pointer for error message.
Solution: Use the right pointer. (closes #7921)
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_expr.vim | 11 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 14 insertions, 1 deletions
diff --git a/src/eval.c b/src/eval.c index 6b12a9704..1ad633965 100644 --- a/src/eval.c +++ b/src/eval.c @@ -3130,7 +3130,7 @@ eval6( */ if (evaluate && in_vim9script() && !IS_WHITE_OR_NUL((*arg)[1])) { - error_white_both(p, 1); + error_white_both(*arg, 1); clear_tv(rettv); return FAIL; } diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim index 26a693242..a55de7e83 100644 --- a/src/testdir/test_vim9_expr.vim +++ b/src/testdir/test_vim9_expr.vim @@ -1254,6 +1254,17 @@ def Test_expr5_vim9script() echo 'a' .. function('len') END CheckScriptFailure(lines, 'E729:', 2) + + lines =<< trim END + vim9script + new + ['']->setline(1) + /pattern + + eval 0 + bwipe! + END + CheckScriptFailure(lines, "E1004: White space required before and after '/' at \"/pattern") enddef def Test_expr5_vim9script_channel() diff --git a/src/version.c b/src/version.c index 4036e2ee1..093f23d2d 100644 --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 2573, +/**/ 2572, /**/ 2571, |