mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3189: Vim9: error when using "try|"
Problem: Vim9: error when using "try|". Solution: Allow for "|" right after a command.
This commit is contained in:
@@ -3691,7 +3691,7 @@ find_ex_command(
|
|||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
if (eap->cmdidx < CMD_SIZE
|
if (eap->cmdidx < CMD_SIZE
|
||||||
&& vim9
|
&& vim9
|
||||||
&& !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!'
|
&& !IS_WHITE_OR_NUL(*p) && *p != '\n' && *p != '!' && *p != '|'
|
||||||
&& (eap->cmdidx < 0 ||
|
&& (eap->cmdidx < 0 ||
|
||||||
(cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0))
|
(cmdnames[eap->cmdidx].cmd_argt & EX_NONWHITE_OK) == 0))
|
||||||
{
|
{
|
||||||
|
@@ -581,6 +581,9 @@ def Test_try_catch_throw()
|
|||||||
endfor
|
endfor
|
||||||
assert_equal(4, counter)
|
assert_equal(4, counter)
|
||||||
|
|
||||||
|
# no requirement for spaces before |
|
||||||
|
try|echo 0|catch|endtry
|
||||||
|
|
||||||
# return in finally after empty catch
|
# return in finally after empty catch
|
||||||
def ReturnInFinally(): number
|
def ReturnInFinally(): number
|
||||||
try
|
try
|
||||||
|
@@ -755,6 +755,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
3189,
|
||||||
/**/
|
/**/
|
||||||
3188,
|
3188,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user