mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 8.2.1718: Vim9: :def function disallows "firstline" for no good reason
Problem: Vim9: :def function disallows "firstline" and "lastline" argument names for no good reason. Solution: Don't check the arguments for a :def function. (closes #6986)
This commit is contained in:
@@ -66,8 +66,9 @@ one_function_arg(char_u *arg, garray_T *newargs, garray_T *argtypes, int skip)
|
||||
while (ASCII_ISALNUM(*p) || *p == '_')
|
||||
++p;
|
||||
if (arg == p || isdigit(*arg)
|
||||
|| (p - arg == 9 && STRNCMP(arg, "firstline", 9) == 0)
|
||||
|| (p - arg == 8 && STRNCMP(arg, "lastline", 8) == 0))
|
||||
|| (argtypes == NULL
|
||||
&& ((p - arg == 9 && STRNCMP(arg, "firstline", 9) == 0)
|
||||
|| (p - arg == 8 && STRNCMP(arg, "lastline", 8) == 0))))
|
||||
{
|
||||
if (!skip)
|
||||
semsg(_("E125: Illegal argument: %s"), arg);
|
||||
|
Reference in New Issue
Block a user