From 4c001173adafb755a37887c9fa321095661b9564 Mon Sep 17 00:00:00 2001 From: Tim Pope Date: Tue, 29 Jan 2008 15:46:22 +0000 Subject: [PATCH] Settle on using repeat#set --- plugin/surround.vim | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/plugin/surround.vim b/plugin/surround.vim index b10df4e..bb1ab83 100644 --- a/plugin/surround.vim +++ b/plugin/surround.vim @@ -334,14 +334,6 @@ function! s:wrapreg(reg,char,...) endfunction " }}}1 -function! s:dotset(seq,count) - " hedging bets on the name of a future plugin - silent! call repeat#set(a:seq,a:count) - if !exists("*repeat#set") - silent! call dot#set(a:seq,a:count) - endif -endfunction - function! s:insert(...) " {{{1 " Optional argument causes the result to appear on 3 lines, not 1 "call inputsave() @@ -494,9 +486,9 @@ function! s:dosurround(...) " {{{1 let s:lastdel = removed let &clipboard = cb_save if newchar == "" - call s:dotset("\Dsurround".char,scount) + silent! call repeat#set("\Dsurround".char,scount) else - call s:dotset("\Csurround".char.newchar,scount) + silent! call repeat#set("\Csurround".char.newchar,scount) endif endfunction " }}}1 @@ -564,7 +556,7 @@ function! s:opfunc(type,...) " {{{1 let &selection = sel_save let &clipboard = cb_save if a:type =~ '^\d\+$' - call s:dotset("\Y".(a:0 ? "S" : "s")."surround".char,a:type) + silent! call repeat#set("\Y".(a:0 ? "S" : "s")."surround".char,a:type) endif endfunction