mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
patch 8.2.1337: Vim9: cannot use empty key in dict assignment
Problem: Vim9: cannot use empty key in dict assignment. Solution: Allow empty key. (closes #6591)
This commit is contained in:
@@ -1422,11 +1422,8 @@ call_def_function(
|
||||
dict_T *dict = tv_dict->vval.v_dict;
|
||||
dictitem_T *di;
|
||||
|
||||
if (key == NULL || *key == NUL)
|
||||
{
|
||||
emsg(_(e_emptykey));
|
||||
goto on_error;
|
||||
}
|
||||
if (key == NULL)
|
||||
key = (char_u *)"";
|
||||
tv = STACK_TV_BOT(-3);
|
||||
di = dict_find(dict, key, -1);
|
||||
if (di != NULL)
|
||||
|
Reference in New Issue
Block a user