From 400808d6142f8713ee244cf154287f9a2857dc7a Mon Sep 17 00:00:00 2001 From: jluehrs2 Date: Wed, 30 Apr 2008 16:47:12 -0500 Subject: script local callback functions should be specified local to where they are defined, not local to where the Textobj function is defined --- vimrc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/vimrc b/vimrc index 887ccc3..8bb8a47 100644 --- a/vimrc +++ b/vimrc @@ -323,11 +323,10 @@ function Textobj(char, callback) endif endfunction - let cbname = '"' . substitute(a:callback, '^s:', '', '') . '"' - exe 'onoremap a'.a:char.' :call Textobj_'.g:text_object_number.'(0, v:operator, v:prevcount, '.cbname.')' - exe 'onoremap i'.a:char.' :call Textobj_'.g:text_object_number.'(1, v:operator, v:prevcount, '.cbname.')' - exe 'xnoremap a'.a:char.' :call Textobj_'.g:text_object_number.'(0, "v", v:prevcount, '.cbname.')' - exe 'xnoremap i'.a:char.' :call Textobj_'.g:text_object_number.'(1, "v", v:prevcount, '.cbname.')' + exe 'onoremap a'.a:char.' :call Textobj_'.g:text_object_number.'(0, v:operator, v:prevcount, "'.a:callback.'")' + exe 'onoremap i'.a:char.' :call Textobj_'.g:text_object_number.'(1, v:operator, v:prevcount, "'.a:callback.'")' + exe 'xnoremap a'.a:char.' :call Textobj_'.g:text_object_number.'(0, "v", v:prevcount, "'.a:callback.'")' + exe 'xnoremap i'.a:char.' :call Textobj_'.g:text_object_number.'(1, "v", v:prevcount, "'.a:callback.'")' endfunction " }}} " Text objects {{{ -- cgit v1.2.3-54-g00ecf