0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.0806: using "func!" after vim9script gives confusing error

Problem:    using "func!" after vim9script gives confusing error.
Solution:   Give E477. (closes #6107)
This commit is contained in:
Bram Moolenaar
2020-05-21 21:50:58 +02:00
parent fe81389d60
commit 74fae513f8
3 changed files with 14 additions and 1 deletions

View File

@@ -84,6 +84,12 @@ ex_vim9script(exarg_T *eap)
{
int lnum_start = SOURCING_LNUM - 1;
if (*p == '!')
{
emsg(_(e_nobang));
break;
}
// Handle :function and :def by calling def_function().
// It will read upto the matching :endded or :endfunction.
eap->cmdidx = *line == 'f' ? CMD_function : CMD_def;