1
0
forked from aniani/vim

patch 8.2.2628: Vim9: #{ can still be used at the script level

Problem:    Vim9: #{ can still be used at the script level.
Solution:   Give an error for #{ like in a :def function.
This commit is contained in:
Bram Moolenaar
2021-03-20 13:29:38 +01:00
parent 4355894869
commit 5c7a299c16
4 changed files with 15 additions and 7 deletions

View File

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