1
0
forked from aniani/vim

patch 8.2.4455: accepting one and zero for second sort() argument is strange

Problem:    Accepting one and zero for the second sort() argument is strange.
Solution:   Disallow using one and zero in Vim9 script.
This commit is contained in:
Bram Moolenaar
2022-02-23 13:17:47 +00:00
parent 6a8b13614e
commit 2007dd49f5
6 changed files with 29 additions and 16 deletions

View File

@@ -603,7 +603,6 @@ arg_sort_how(type_T *type, type_T *decl_type UNUSED, argcontext_T *context)
{
if (type->tt_type == VAR_STRING
|| type->tt_type == VAR_PARTIAL
|| type->tt_type == VAR_NUMBER // 1 means ignore case
|| type == &t_unknown
|| type == &t_any)
return OK;