diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2022-04-04 15:16:54 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-04-04 15:16:54 +0100 |
commit | 4829c1c9e9095a3303caec9af7d02f6547f6df0e (patch) | |
tree | 2b3819cd2ea17b652ba29f3a8a6ea9945ec6c4bb /src/popupwin.c | |
parent | 7a411a306f90339d8686e42ac16e1ae4fc7533c5 (diff) | |
download | vim-git-4829c1c9e9095a3303caec9af7d02f6547f6df0e.tar.gz |
patch 8.2.4683: verbose check with dict_find() to see if a key is presentv8.2.4683
Problem: Verbose check with dict_find() to see if a key is present.
Solution: Add dict_has_key(). (Yegappan Lakshmanan, closes #10074)
Diffstat (limited to 'src/popupwin.c')
-rw-r--r-- | src/popupwin.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/popupwin.c b/src/popupwin.c index c3251eae1..9c0cade2d 100644 --- a/src/popupwin.c +++ b/src/popupwin.c @@ -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 |