aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2008-04-30 16:47:12 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2008-04-30 16:47:12 -0500
commit400808d6142f8713ee244cf154287f9a2857dc7a (patch)
treea6979758e01e1a63eb34a3678a4a03a73ec515c5
parentbc0761fde402c7b0edb16afe7ef6a559681cdf06 (diff)
downloadvim-textobj-400808d6142f8713ee244cf154287f9a2857dc7a.tar.gz
vim-textobj-400808d6142f8713ee244cf154287f9a2857dc7a.zip
script local callback functions should be specified local to where they are defined, not local to where the Textobj function is defined
-rw-r--r--vimrc9
1 files 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:', '<SID>', '') . '"'
- exe 'onoremap <silent>a'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(0, v:operator, v:prevcount, '.cbname.')<CR>'
- exe 'onoremap <silent>i'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(1, v:operator, v:prevcount, '.cbname.')<CR>'
- exe 'xnoremap <silent>a'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(0, "v", v:prevcount, '.cbname.')<CR>'
- exe 'xnoremap <silent>i'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(1, "v", v:prevcount, '.cbname.')<CR>'
+ exe 'onoremap <silent>a'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(0, v:operator, v:prevcount, "'.a:callback.'")<CR>'
+ exe 'onoremap <silent>i'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(1, v:operator, v:prevcount, "'.a:callback.'")<CR>'
+ exe 'xnoremap <silent>a'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(0, "v", v:prevcount, "'.a:callback.'")<CR>'
+ exe 'xnoremap <silent>i'.a:char.' <Esc>:call Textobj_'.g:text_object_number.'(1, "v", v:prevcount, "'.a:callback.'")<CR>'
endfunction
" }}}
" Text objects {{{