Fix hiding of Vim's internal undo/redo messages

Patch from @wilywampa.

Fixes: https://github.com/tpope/vim-repeat/issues/27
This commit is contained in:
Daniel Hahler 2014-11-05 21:42:46 +01:00
parent 2a3c5f8e3c
commit 62745d5997

View file

@ -97,7 +97,8 @@ endfunction
function! repeat#wrap(command,count)
let preserve = (g:repeat_tick == b:changedtick)
exe 'norm! '.(a:count ? a:count : '').a:command . (&foldopen =~# 'undo' ? 'zv' : '')
call feedkeys((a:count ? a:count : '').a:command, 'n')
exe (&foldopen =~# 'undo' ? 'norm! zv' : '')
if preserve
let g:repeat_tick = b:changedtick
endif