patch 8.2.2629: Vim9: error for #{{ is not desired
Problem: Vim9: error for #{{ is not desired.
Solution: Adjust the checks. (closes #7990)
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
index 67bcc73..d82d2b8 100644
--- a/src/ex_docmd.c
+++ b/src/ex_docmd.c
@@ -5234,7 +5234,8 @@
return TRUE;
#ifdef FEAT_EVAL
if (in_vim9script())
- return c == '#' && cmd[1] != '{'
+ // # starts a comment, #{ might be a mistake, #{{ can start a fold
+ return c == '#' && (cmd[1] != '{' || cmd[2] == '{')
&& (cmd == cmd_start || VIM_ISWHITE(cmd[-1]));
#endif
return c == '"';