diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-30 16:47:12 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-04-30 16:47:12 -0500 |
commit | 400808d6142f8713ee244cf154287f9a2857dc7a (patch) | |
tree | a6979758e01e1a63eb34a3678a4a03a73ec515c5 | |
parent | bc0761fde402c7b0edb16afe7ef6a559681cdf06 (diff) | |
download | vim-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-- | vimrc | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 {{{ |