mirror of
https://github.com/vim/vim.git
synced 2025-11-14 23:04:02 -05:00
updated for version 7.4.268
Problem: Using exists() on a funcref for a script-local function does not
work.
Solution: Translate <SNR> to the special byte sequence. Add a test.
This commit is contained in:
@@ -180,6 +180,9 @@ endfun
|
||||
:echo g:Foo(2)
|
||||
:echo Foo(3)
|
||||
:"
|
||||
:" script-local function used in Funcref must exist.
|
||||
:so test_eval_func.vim
|
||||
:"
|
||||
:/^start:/+1,$wq! test.out
|
||||
:" vim: et ts=4 isk-=\: fmr=???,???
|
||||
:call getchar()
|
||||
|
||||
Binary file not shown.
10
src/testdir/test_eval_func.vim
Normal file
10
src/testdir/test_eval_func.vim
Normal file
@@ -0,0 +1,10 @@
|
||||
" Vim script used in test_eval.in. Needed for script-local function.
|
||||
|
||||
func! s:Testje()
|
||||
return "foo"
|
||||
endfunc
|
||||
let Bar = function('s:Testje')
|
||||
$put ='s:Testje exists: ' . exists('s:Testje')
|
||||
$put ='func s:Testje exists: ' . exists('*s:Testje')
|
||||
$put ='Bar exists: ' . exists('Bar')
|
||||
$put ='func Bar exists: ' . exists('*Bar')
|
||||
Reference in New Issue
Block a user