mirror of
https://github.com/vim/vim.git
synced 2025-10-14 07:04:10 -04:00
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
@@ -848,7 +848,7 @@ f_timer_start(typval_T *argvars, typval_T *rettv)
|
||||
semsg(_(e_invalid_argument_str), tv_get_string(&argvars[2]));
|
||||
return;
|
||||
}
|
||||
if (dict_find(dict, (char_u *)"repeat", -1) != NULL)
|
||||
if (dict_has_key(dict, "repeat"))
|
||||
repeat = dict_get_number(dict, (char_u *)"repeat");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user