1
0
forked from aniani/vim

patch 8.2.3257: calling prop_find() with -1 for ID gives errornous error

Problem:    Calling prop_find() with -1 for ID gives errornous error. (Naohiro
            Ono)
Solution:   When passing -1 use -2. (closes #8674)
This commit is contained in:
Bram Moolenaar
2021-07-31 18:33:57 +02:00
parent bf634a0a8b
commit 8e3fc135e8
3 changed files with 9 additions and 0 deletions

View File

@@ -686,7 +686,11 @@ f_prop_find(typval_T *argvars, typval_T *rettv)
skipstart = dict_get_bool(dict, (char_u *)"skipstart", 0);
if (dict_find(dict, (char_u *)"id", -1) != NULL)
{
id = dict_get_number(dict, (char_u *)"id");
if (id == -1)
id = -2;
}
if (dict_find(dict, (char_u *)"type", -1))
{
char_u *name = dict_get_string(dict, (char_u *)"type", FALSE);