aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordoy <doy@tozt.net>2008-12-23 01:21:56 -0500
committerdoy <doy@tozt.net>2008-12-23 01:21:56 -0500
commitb6189a4feda697855dde5266d0f52ecc1cb326e7 (patch)
tree4f284f86c6552e4a5132338f444161d64c6a3edb
parentec85152530db6fc1aaaea27add80558109bdc031 (diff)
downloadvim-textobj-b6189a4feda697855dde5266d0f52ecc1cb326e7.tar.gz
vim-textobj-b6189a4feda697855dde5266d0f52ecc1cb326e7.zip
allow the Textobj function to take extra arguments to pass on to the callback
-rw-r--r--vim/plugin/textobj.vim4
1 files changed, 2 insertions, 2 deletions
diff --git a/vim/plugin/textobj.vim b/vim/plugin/textobj.vim
index e60abd8..3578a72 100644
--- a/vim/plugin/textobj.vim
+++ b/vim/plugin/textobj.vim
@@ -1,12 +1,12 @@
" Text object creation {{{
" XXX: use virtualedit here, it should greatly simplify things
let s:text_object_number = 0
-function Textobj(char, callback)
+function Textobj(char, callback, ...)
let s:text_object_number += 1
function s:textobj_{s:text_object_number}(inner, operator, count, callback)
try
let pos = getpos('.')
- sandbox let [startline, startcol, endline, endcol] = function(a:callback)(a:inner, a:count)
+ sandbox let [startline, startcol, endline, endcol] = call(a:callback, [a:inner, a:count] + a:000)
catch /no-match/
return
finally