1
0
forked from aniani/vim

patch 8.2.2484: Vim9: Cannot use a comment starting with #{

Problem:    Vim9: Cannot use a comment starting with #{ after an expression.
Solution:   Remove the check for "{" since #{ dictionaries are not supported.
This commit is contained in:
Bram Moolenaar 2021-02-07 16:40:05 +01:00
parent 6628b7ebff
commit dee37dc733
3 changed files with 7 additions and 2 deletions

View File

@ -5212,8 +5212,7 @@ ends_excmd2(char_u *cmd_start UNUSED, char_u *cmd)
return TRUE;
#ifdef FEAT_EVAL
if (in_vim9script())
return c == '#' && cmd[1] != '{'
&& (cmd == cmd_start || VIM_ISWHITE(cmd[-1]));
return c == '#' && (cmd == cmd_start || VIM_ISWHITE(cmd[-1]));
#endif
return c == '"';
}

View File

@ -2205,6 +2205,10 @@ def Test_while_loop()
result ..= cnt .. '_'
endwhile
assert_equal('1_3_', result)
var s = ''
while s == 'x' #{comment
endwhile
enddef
def Test_while_loop_fails()

View File

@ -750,6 +750,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
2484,
/**/
2483,
/**/