mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.0.0654: no warning for text after :endfunction
Problem: Text found after :endfunction is silently ignored. Solution: Give a warning if 'verbose' is set. When | or \n are used, execute the text as a command.
This commit is contained in:
@@ -2130,6 +2130,14 @@ ex_function(exarg_T *eap)
|
||||
/* Check for "endfunction". */
|
||||
if (checkforcmd(&p, "endfunction", 4) && nesting-- == 0)
|
||||
{
|
||||
if (*p == '|')
|
||||
/* Another command follows. */
|
||||
eap->nextcmd = vim_strsave(p + 1);
|
||||
else if (line_arg != NULL && *skipwhite(line_arg) != NUL)
|
||||
/* 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);
|
||||
if (line_arg == NULL)
|
||||
vim_free(theline);
|
||||
break;
|
||||
|
Reference in New Issue
Block a user