diff --git a/autoload/repeat.vim b/autoload/repeat.vim index a7a6919..1144f60 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -125,16 +125,13 @@ endfunction function! repeat#wrap(command,count) let preserve = (g:repeat_tick == b:changedtick) - call feedkeys((a:count ? a:count : '').a:command, 'ntix') - if preserve - let g:repeat_tick = b:changedtick - endif + return (a:count ? a:count : '') . a:command . (preserve ? ":let g:repeat_tick = b:changedtick\r" : '') endfunction nnoremap (RepeatDot) :if !repeat#run(v:count)echoerr repeat#errmsg()endif -nnoremap (RepeatUndo) :call repeat#wrap('u',v:count) -nnoremap (RepeatUndoLine) :call repeat#wrap('U',v:count) -nnoremap (RepeatRedo) :call repeat#wrap("\C-R>",v:count) +nmap