aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-04-30 14:27:34 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-04-30 14:27:34 -0500
commitc4ee4359c420c853bc682242cc57f11f8f7cafe4 (patch)
treed375b8c366d1af1fc08bbe3230affe4b38bcc39a
parentc25f28959e6f5f6015d7610a4a4af5e7ca105cf6 (diff)
downloadvim-textobj-c4ee4359c420c853bc682242cc57f11f8f7cafe4.tar.gz
vim-textobj-c4ee4359c420c853bc682242cc57f11f8f7cafe4.zip
execute the callback function in the sandbox, so it doesn't do anything weird like change the buffer
-rw-r--r--vimrc2
1 files changed, 1 insertions, 1 deletions
diff --git a/vimrc b/vimrc
index a7d7cd9..d33e693 100644
--- a/vimrc
+++ b/vimrc
@@ -288,7 +288,7 @@ function Textobj(char, callback)
function Textobj_{g:text_object_number}(inner, operator, count, callback)
try
let pos = getpos('.')
- let [startline, startcol, endline, endcol] = function(a:callback)(a:inner, a:count)
+ sandbox let [startline, startcol, endline, endcol] = function(a:callback)(a:inner, a:count)
catch /no-match/
return
finally