summaryrefslogtreecommitdiff
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-05-28 22:06:46 +0200
committerBram Moolenaar <Bram@vim.org>2010-05-28 22:06:46 +0200
commitbc42c1e4273e723439e10d7da39e3ea6f63434d3 (patch)
tree849d23b5cb798c95d00e17718f8d63f723c3f343 /src/testdir
parent04fa5427b80b17f4d26f75b24668999b4c322f5b (diff)
downloadvim-bc42c1e4273e723439e10d7da39e3ea6f63434d3.zip
updated for version 7.2.440
Problem: Calling a function through a funcref, where the function deletes the funcref, leads to an invalid memory access. Solution: Make a copy of the function name. (Lech Lorens)
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/test34.in6
-rw-r--r--src/testdir/test34.ok2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/testdir/test34.in b/src/testdir/test34.in
index 5eef71500..28fd00c4b 100644
--- a/src/testdir/test34.in
+++ b/src/testdir/test34.in
@@ -35,6 +35,11 @@ STARTTEST
: let g:counter = 0
: return ''
:endfunc
+:func FuncWithRef(a)
+: unlet g:FuncRef
+: return a:a
+:endfunc
+:let g:FuncRef=function("FuncWithRef")
:let counter = 0
:inoremap <expr> ( ListItem()
:inoremap <expr> [ ListReset()
@@ -47,6 +52,7 @@ C=Table("xxx", 4, "asdf")
=retval
=Compute(45, 5, "retval")
=retval
+ =g:FuncRef(333)
XX+-XX
---*---
diff --git a/src/testdir/test34.ok b/src/testdir/test34.ok
index 368ae10ef..951dd8bc6 100644
--- a/src/testdir/test34.ok
+++ b/src/testdir/test34.ok
@@ -1,4 +1,4 @@
-xxx4asdf fail nop ok 9
+xxx4asdf fail nop ok 9 333
XX111XX
---222---
1. one