Fix repeat after undo

This commit is contained in:
lacygoill 2020-05-12 05:22:24 +02:00
parent c947ad2b6a
commit 1227ea795b

View file

@ -134,7 +134,10 @@ function! repeat#wrap(command,count)
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 <buffer> let g:repeat_tick = b:changedtick | autocmd! repeat_preserve_after_undo
augroup END
endif
endfunction