forked from aniani/vim
patch 8.2.2744: Vim9: no way to explicitly ignore an argument
Problem: Vim9: no way to explicitly ignore an argument. Solution: Use the underscore as the name for an ignored argument.
This commit is contained in:
@@ -3188,6 +3188,11 @@ set_var_const(
|
||||
goto failed;
|
||||
}
|
||||
var_in_vim9script = is_script_local && current_script_is_vim9();
|
||||
if (var_in_vim9script && name[0] == '_' && name[1] == NUL)
|
||||
{
|
||||
emsg(_(e_cannot_use_underscore_here));
|
||||
goto failed;
|
||||
}
|
||||
|
||||
di = find_var_in_ht(ht, 0, varname, TRUE);
|
||||
|
||||
|
Reference in New Issue
Block a user