0
0
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:
Bram Moolenaar
2014-04-24 17:12:33 +02:00
parent eccb7fc315
commit a4f317df89
4 changed files with 19 additions and 9 deletions

View File

@@ -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.