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
@@ -1957,7 +1957,7 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
|
||||
|
||||
if (d != NULL)
|
||||
{
|
||||
if (dict_find(d, (char_u *)"tabpage", -1) != NULL)
|
||||
if (dict_has_key(d, "tabpage"))
|
||||
tabnr = (int)dict_get_number(d, (char_u *)"tabpage");
|
||||
else if (type == TYPE_NOTIFICATION)
|
||||
tabnr = -1; // notifications are global by default
|
||||
|
||||
Reference in New Issue
Block a user