Account for Vim undo double-incrementing b:changedtick

Resolves: https://github.com/tpope/vim-repeat/issues/63
Resolves: https://github.com/tpope/vim-repeat/issues/94
Resolves: https://github.com/tpope/vim-repeat/pull/95
This commit is contained in:
Tim Pope 2024-07-07 13:00:05 -04:00
parent e0466d2b24
commit 8b4435c5bb

View file

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