diff --git a/autoload/repeat.vim b/autoload/repeat.vim index e76c335..b270fc4 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -136,10 +136,13 @@ endfunction function! repeat#wrap(command,count) let preserve = (g:repeat_tick == b:changedtick) - call feedkeys((a:count ? a:count : '').a:command, 'nx') + call feedkeys((a:count ? a:count : '').a:command, 'n') exe (&foldopen =~# 'undo\|all' ? 'norm! zv' : '') if preserve - let g:repeat_tick = b:changedtick + augroup repeat_preserve_after_undo + autocmd! + autocmd TextChanged let g:repeat_tick = b:changedtick | autocmd! repeat_preserve_after_undo + augroup END endif endfunction