Created
January 15, 2010 08:24
-
-
Save thinca/277902 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -r f3c987fb99b9 src/eval.c | |
--- a/src/eval.c Tue Jan 12 21:31:21 2010 +0100 | |
+++ b/src/eval.c Fri Jan 15 18:46:28 2010 +0900 | |
@@ -5334,6 +5334,9 @@ | |
} | |
{ | |
dictitem_T *item; | |
+ dict_T *dict; | |
+ dictitem_T *proto; | |
+ int deep = 100; | |
if (len == -1) | |
{ | |
@@ -5347,7 +5350,16 @@ | |
} | |
} | |
- item = dict_find(rettv->vval.v_dict, key, (int)len); | |
+ dict = rettv->vval.v_dict; | |
+ item = dict_find(dict, key, (int)len); | |
+ | |
+ while (0 < --deep && item == NULL | |
+ && (proto = dict_find(dict, "prototype", -1)) != NULL | |
+ && proto->di_tv.v_type == VAR_DICT) | |
+ { | |
+ dict = proto->di_tv.vval.v_dict; | |
+ item = dict_find(dict, key, (int)len); | |
+ } | |
if (item == NULL && verbose) | |
EMSG2(_(e_dictkey), key); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment