Patch 8.2.3189

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jul 20, 2021, 1:19:18 PM7/20/21
to vim...@googlegroups.com

Patch 8.2.3189
Problem: Vim9: error when using "try|".
Solution: Allow for "|" right after a command.
Files: src/ex_docmd.c, src/testdir/test_vim9_script.vim


*** ../vim-8.2.3188/src/ex_docmd.c 2021-07-19 20:07:16.701295618 +0200
--- src/ex_docmd.c 2021-07-20 18:58:53.204732030 +0200
***************
*** 3691,3697 ****
#ifdef FEAT_EVAL
if (eap->cmdidx < CMD_SIZE
&& vim9
! && !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!'
&& (eap->cmdidx < 0 ||
(cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0))
{
--- 3691,3697 ----
#ifdef FEAT_EVAL
if (eap->cmdidx < CMD_SIZE
&& vim9
! && !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!' && *p != '|'
&& (eap->cmdidx < 0 ||
(cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0))
{
*** ../vim-8.2.3188/src/testdir/test_vim9_script.vim 2021-07-19 21:45:03.832786190 +0200
--- src/testdir/test_vim9_script.vim 2021-07-20 19:01:37.496626793 +0200
***************
*** 581,586 ****
--- 581,589 ----
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
*** ../vim-8.2.3188/src/version.c 2021-07-20 17:51:48.251744105 +0200
--- src/version.c 2021-07-20 18:59:44.964704188 +0200
***************
*** 757,758 ****
--- 757,760 ----
{ /* Add new patch number below this line */
+ /**/
+ 3189,
/**/

--
What is the difference between a professional and an amateur?
The ark was built by an amateur; professionals gave us the Titanic.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages