From 1e4cf6f319763dbae6ab01d86625b30f3256eac4 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Mon, 6 Nov 2006 05:53:09 +0000 Subject: [PATCH] Discard numerical argument for ys and yS --- plugin/surround.vim | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/surround.vim b/plugin/surround.vim index 3f11a78..85e96e8 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -691,10 +691,11 @@ endfunction " }}}1 nnoremap Dsurround :call dosurround(inputtarget()) nnoremap Csurround :call changesurround() -nnoremap Ysurround :set opfunc=opfuncg@ -nnoremap YSurround :set opfunc=opfunc2g@ nnoremap Yssurround :call opfunc(v:count1) nnoremap YSsurround :call opfunc2(v:count1) +" discards the numerical argument but there's not much we can do with it +nnoremap Ysurround :set opfunc=opfuncg@ +nnoremap YSurround :set opfunc=opfunc2g@ vnoremap Vsurround :call opfunc(visualmode()) vnoremap VSurround :call opfunc2(visualmode()) inoremap Isurround =insert() @@ -714,7 +715,7 @@ if !exists("g:surround_no_mappings") || ! g:surround_no_mappings if !hasmapto("VSurround","v") vmap S VSurround endif - if !hasmapto("Isurround","i") + if !hasmapto("Isurround","i") && !mapcheck("","i") imap Isurround endif "Implemented internally instead