From c4ee4359c420c853bc682242cc57f11f8f7cafe4 Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Wed, 30 Apr 2008 14:27:34 -0500 Subject: execute the callback function in the sandbox, so it doesn't do anything weird like change the buffer --- vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3