From 193f4866df114390459739934506b8a0e5ca4ab0 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Sat, 17 Jan 2015 09:55:08 -0500 Subject: [PATCH] Use :norm for Vim 7.3.100 or later Fixes #23 --- autoload/repeat.vim | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/autoload/repeat.vim b/autoload/repeat.vim index ef72247..e464635 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -88,10 +88,18 @@ function! repeat#run(count) let c = g:repeat_count let s = g:repeat_sequence let cnt = c == -1 ? "" : (a:count ? a:count : (c ? c : '')) - call feedkeys(r . cnt, 'n') - call feedkeys(s) + if (v:version > 703 || (v:version == 703 && has('patch100'))) + exe 'norm ' . r . cnt . s + elseif + call feedkeys(r . cnt, 'n') + call feedkeys(s) + endif else - call feedkeys((a:count ? a:count : '') . '.', 'n') + if (v:version > 703 || (v:version == 703 && has('patch100'))) + exe 'norm! '.(a:count ? a:count : '') . '.' + elseif + call feedkeys((a:count ? a:count : '') . '.', 'n') + endif endif endfunction