mirror of
https://github.com/neovim/neovim.git
synced 2026-08-25 00:21:55 +00:00
vim-patch:8.2.1478: Vim9: cannot use "true" for some popup options (#41236)
Problem: Vim9: cannot use "true" for some popup options.
Solution: Add dict_get_bool(). (closes vim/vim#6725)
558813314d
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -2327,6 +2327,13 @@ varnumber_T tv_dict_get_number_def(const dict_T *const d, const char *const key,
|
||||
return tv_get_number(&di->di_tv);
|
||||
}
|
||||
|
||||
/// Gets a bool item from a dictionary, or a given default value.
|
||||
///
|
||||
/// @param[in] d Dictionary to get item from.
|
||||
/// @param[in] key Key to find in dictionary.
|
||||
/// @param[in] def Default value.
|
||||
///
|
||||
/// @return Number value, or `def` value if the item does not exist.
|
||||
varnumber_T tv_dict_get_bool(const dict_T *const d, const char *const key, const int def)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user