patch 8.2.1314: Vim9: rule for comment after :function is confusing
Problem: Vim9: rule for comment after :function is confusing.
Solution: Allow double quoted comment after :function in vim9script.
(closes #6556)
diff --git a/src/userfunc.c b/src/userfunc.c
index d17e807..343c9cd 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -2832,7 +2832,8 @@
if (*p == '\n')
line_arg = p + 1;
else if (*p != NUL
- && !(*p == '"' && !(vim9script || eap->cmdidx == CMD_def))
+ && !(*p == '"' && (!vim9script || eap->cmdidx == CMD_function)
+ && eap->cmdidx != CMD_def)
&& !(*p == '#' && (vim9script || eap->cmdidx == CMD_def))
&& !eap->skip
&& !did_emsg)