Go back to using feedkeys()

Since there seems to be a bug with "norm" in Vim prior to 7.3.100,
better go back to using feedkeys.

The repeat call can still be remapped by using something like:

  nnoremap . :call repeat#run(v:count)<bar>call feedkeys('`.', 'n')<cr>
This commit is contained in:
Andrew Radev 2012-11-07 09:31:54 +01:00 committed by Tim Pope
parent f1d0fbbdf4
commit d8f7fe7598

View File

@ -84,9 +84,10 @@ function! repeat#run(count)
let c = g:repeat_count
let s = g:repeat_sequence
let cnt = c == -1 ? "" : (a:count ? a:count : (c ? c : ''))
exe 'norm ' . r . cnt . s
call feedkeys(r . cnt, 'n')
call feedkeys(s)
else
exe 'norm! '.(a:count ? a:count : '') . '.'
call feedkeys((a:count ? a:count : '') . '.', 'n')
endif
endfunction