patch 8.2.4683: verbose check with dict_find() to see if a key is present
Problem: Verbose check with dict_find() to see if a key is present. Solution: Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
This commit is contained in:
committed by
Bram Moolenaar
parent
7a411a306f
commit
4829c1c9e9
@ -2786,7 +2786,7 @@ sign_unplace_from_dict(typval_T *group_tv, dict_T *dict)
|
||||
if (buf == NULL)
|
||||
goto cleanup;
|
||||
}
|
||||
if (dict_find(dict, (char_u *)"id", -1) != NULL)
|
||||
if (dict_has_key(dict, "id"))
|
||||
{
|
||||
sign_id = dict_get_number(dict, (char_u *)"id");
|
||||
if (sign_id <= 0)
|
||||
|
||||
Reference in New Issue
Block a user