mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.4871: Vim9: in :def function no error for misplaced range
Problem: Vim9: in :def function no error for using a range with a command that does not accept one. Solution: Check for the command to accept a range. (closes #10330)
This commit is contained in:
@@ -3080,6 +3080,11 @@ compile_def_function(
|
||||
ea.forceit = TRUE;
|
||||
p = skipwhite(p + 1);
|
||||
}
|
||||
if ((ea.argt & EX_RANGE) == 0 && ea.addr_count > 0)
|
||||
{
|
||||
emsg(_(e_no_range_allowed));
|
||||
goto erret;
|
||||
}
|
||||
}
|
||||
|
||||
switch (ea.cmdidx)
|
||||
|
Reference in New Issue
Block a user