diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-07-20 19:18:44 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-07-20 19:18:44 +0200 |
commit | 9fa5dabedc4ed5af85773413e91c2fdbe4cb9f0a (patch) | |
tree | d15701baccc3459cb709b97b5eba688c512bfcf6 /src | |
parent | 83494b4ac61898f687d6ef9dce4bad5802fb8e51 (diff) | |
download | vim-git-9fa5dabedc4ed5af85773413e91c2fdbe4cb9f0a.tar.gz |
patch 8.2.3189: Vim9: error when using "try|"v8.2.3189
Problem: Vim9: error when using "try|".
Solution: Allow for "|" right after a command.
Diffstat (limited to 'src')
-rw-r--r-- | src/ex_docmd.c | 2 | ||||
-rw-r--r-- | src/testdir/test_vim9_script.vim | 3 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 9eb423e0d..0273f899a 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -3691,7 +3691,7 @@ find_ex_command( #ifdef FEAT_EVAL if (eap->cmdidx < CMD_SIZE && vim9 - && !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!' + && !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!' && *p != '|' && (eap->cmdidx < 0 || (cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0)) { diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index 037c36d29..8c80e1801 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -581,6 +581,9 @@ def Test_try_catch_throw() endfor assert_equal(4, counter) + # no requirement for spaces before | + try|echo 0|catch|endtry + # return in finally after empty catch def ReturnInFinally(): number try diff --git a/src/version.c b/src/version.c index 4244d82ca..94825c19b 100644 --- a/src/version.c +++ b/src/version.c @@ -756,6 +756,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3189, +/**/ 3188, /**/ 3187, |