diff --git a/autoload/repeat.vim b/autoload/repeat.vim index df9a7fe..4cc5667 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -68,7 +68,7 @@ function! repeat#setreg(sequence,register) let g:repeat_reg = [a:sequence, a:register] endfunction -function! s:repeat(count) +function! repeat#run(count) if g:repeat_tick == b:changedtick let r = '' if g:repeat_reg[0] ==# g:repeat_sequence && !empty(g:repeat_reg[1]) @@ -84,10 +84,9 @@ function! s:repeat(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) + exe 'norm ' . r . cnt . s else - call feedkeys((a:count ? a:count : '') . '.', 'n') + exe 'norm! '.(a:count ? a:count : '') . '.' endif endfunction @@ -99,7 +98,7 @@ function! s:wrap(command,count) endif endfunction -nnoremap . :call repeat(v:count) +nnoremap . :call repeat#run(v:count) nnoremap u :call wrap('u',v:count) if maparg('U','n') ==# '' nnoremap U :call wrap('U',v:count)