mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
updated for version 7.4.265
Problem: Can't call a global function with "g:" in an expression. Solution: Skip the "g:" when looking up the function.
This commit is contained in:
@@ -172,11 +172,13 @@ endfun
|
||||
:endtry
|
||||
:"
|
||||
:" function name starting with/without "g:", buffer-local funcref.
|
||||
:function! g:Foo()
|
||||
: $put ='called Foo()'
|
||||
:function! g:Foo(n)
|
||||
: $put ='called Foo(' . a:n . ')'
|
||||
:endfunction
|
||||
:let b:my_func = function('Foo')
|
||||
:call b:my_func()
|
||||
:call b:my_func(1)
|
||||
:echo g:Foo(2)
|
||||
:echo Foo(3)
|
||||
:"
|
||||
:/^start:/+1,$wq! test.out
|
||||
:" vim: et ts=4 isk-=\: fmr=???,???
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user