mirror of
https://github.com/neovim/neovim.git
synced 2025-09-30 23:18:33 +00:00
vim-patch:8.2.3695: confusing error for missing key (#26420)
Problem: Confusing error for missing key.
Solution: Use the actualy key for the error. (closes vim/vim#9241)
5c1ec439f0
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -3735,7 +3735,11 @@ static int eval_index_inner(typval_T *rettv, bool is_range, typval_T *var1, typv
|
||||
dictitem_T *const item = tv_dict_find(rettv->vval.v_dict, key, keylen);
|
||||
|
||||
if (item == NULL && verbose) {
|
||||
semsg(_(e_dictkey), key);
|
||||
if (keylen > 0) {
|
||||
semsg(_(e_dictkey_len), keylen, key);
|
||||
} else {
|
||||
semsg(_(e_dictkey), key);
|
||||
}
|
||||
}
|
||||
if (item == NULL || tv_is_luafunc(&item->di_tv)) {
|
||||
return FAIL;
|
||||
|
Reference in New Issue
Block a user