1
0
forked from aniani/vim

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.
This commit is contained in:
Bram Moolenaar
2017-06-23 20:52:40 +02:00
parent 4670490673
commit f8be461d02
6 changed files with 39 additions and 18 deletions

View File

@@ -2137,7 +2137,9 @@ ex_function(exarg_T *eap)
/* 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;