summaryrefslogtreecommitdiff
path: root/src/ex_docmd.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-20 13:29:38 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-20 13:29:38 +0100
commit5c7a299c1652b28977c30e3e3a5ab93c65e7f7ed (patch)
treec14eaf648415c5eeccb3e9feb4cfda533c4cde73 /src/ex_docmd.c
parent4355894869355c185e7810e67d52802453576e81 (diff)
downloadvim-git-5c7a299c1652b28977c30e3e3a5ab93c65e7f7ed.tar.gz
patch 8.2.2628: Vim9: #{ can still be used at the script levelv8.2.2628
Problem: Vim9: #{ can still be used at the script level. Solution: Give an error for #{ like in a :def function.
Diffstat (limited to 'src/ex_docmd.c')
-rw-r--r--src/ex_docmd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 477d140bd..67bcc7370 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -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 == '"';
}