Created
June 17, 2013 14:40
-
-
Save thinca/5797391 to your computer and use it in GitHub Desktop.
This file contains 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 6e9667d3f166 src/eval.c | |
--- a/src/eval.c Sun Jun 16 22:49:14 2013 +0200 | |
+++ b/src/eval.c Mon Jun 17 23:40:59 2013 +0900 | |
@@ -21281,12 +21281,7 @@ | |
if (!eap->skip) | |
{ | |
- /* Check the name of the function. Unless it's a dictionary function | |
- * (that we are overwriting). */ | |
- if (name != NULL) | |
- arg = name; | |
- else | |
- arg = fudi.fd_newkey; | |
+ arg = name; | |
if (arg != NULL && (fudi.fd_di == NULL | |
|| fudi.fd_di->di_tv.v_type != VAR_FUNC)) | |
{ | |
diff -r 6e9667d3f166 src/testdir/test55.in | |
--- a/src/testdir/test55.in Sun Jun 16 22:49:14 2013 +0200 | |
+++ b/src/testdir/test55.in Mon Jun 17 23:40:59 2013 +0900 | |
@@ -190,6 +190,13 @@ | |
:catch | |
: $put =v:exception[:15] | |
:endtry | |
+:" | |
+:" Dictionary function that is not a variable name | |
+:let g:dict = {} | |
+:function g:dict['/func']() dict | |
+: $put ='/func' | |
+:endfunc | |
+:call g:dict['/func']() | |
:" | |
:" Function in script-local List or Dict | |
:let g:dict = {} | |
diff -r 6e9667d3f166 src/testdir/test55.ok | |
--- a/src/testdir/test55.ok Sun Jun 16 22:49:14 2013 +0200 | |
+++ b/src/testdir/test55.ok Mon Jun 17 23:40:59 2013 +0900 | |
@@ -47,8 +47,9 @@ | |
len: 3 | |
again: 3 | |
Vim(call):E725: | |
+/func | |
g:dict.func-4 | |
-a:function('3') | |
+a:function('4') | |
Vim(let):E698: | |
same list: 1 | |
depth is 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment