patch 8.0.0663: unexpected error message only when 'verbose' is set
Problem: Giving an error message only when 'verbose' set is unexpected.
Solution: Give a warning message instead.
diff --git a/src/userfunc.c b/src/userfunc.c
index 34da2ef..dfd7fcc 100644
--- a/src/userfunc.c
+++ b/src/userfunc.c
@@ -2137,7 +2137,9 @@
/* Another command follows. */
eap->nextcmd = line_arg;
else if (*p != NUL && *p != '"' && p_verbose > 0)
- EMSG2((char_u *)_("E946: Text found after :endfunction: %s"), p);
+ give_warning2(
+ (char_u *)_("W22: Text found after :endfunction: %s"),
+ p, TRUE);
if (line_arg == NULL)
vim_free(theline);
break;