diff --git a/autoload/repeat.vim b/autoload/repeat.vim index f00e92b..88a20bb 100644 --- a/autoload/repeat.vim +++ b/autoload/repeat.vim @@ -37,8 +37,13 @@ let g:loaded_repeat = 1 let g:repeat_tick = -1 +" Special function to avoid spurious repeats in a related, naturally repeating +" mapping when your repeatable mapping doesn't increase b:changedtick. +function! repeat#invalidate() + let g:repeat_tick = -1 +endfunction + function! repeat#set(sequence,...) - call setline(line('.'), getline('.')) let g:repeat_sequence = a:sequence let g:repeat_count = a:0 ? a:1 : v:count let g:repeat_tick = b:changedtick