forked from aniani/vim
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
@@ -1027,8 +1027,8 @@ item_end:
|
||||
|
||||
case JSON_OBJECT:
|
||||
if (cur_item != NULL
|
||||
&& dict_find(top_item->jd_tv.vval.v_dict,
|
||||
top_item->jd_key, -1) != NULL)
|
||||
&& dict_has_key(top_item->jd_tv.vval.v_dict,
|
||||
(char *)top_item->jd_key))
|
||||
{
|
||||
semsg(_(e_duplicate_key_in_json_str), top_item->jd_key);
|
||||
clear_tv(cur_item);
|
||||
|
Reference in New Issue
Block a user