Pass flag 'i' to feedkeys() calls

Only fall back to :norm for versions 7.3.100 <= v < 7.4.601
This commit is contained in:
Christian Wellenbrock 2015-01-28 16:49:35 +01:00
parent bd3b517235
commit ad89be240f

View File

@ -89,17 +89,17 @@ function! repeat#run(count)
let c = g:repeat_count let c = g:repeat_count
let s = g:repeat_sequence let s = g:repeat_sequence
let cnt = c == -1 ? "" : (a:count ? a:count : (c ? c : '')) let cnt = c == -1 ? "" : (a:count ? a:count : (c ? c : ''))
if (v:version > 703 || (v:version == 703 && has('patch100'))) if ((v:version == 703 && has('patch100')) || (v:version == 704 && !has('patch601')))
exe 'norm ' . r . cnt . s exe 'norm ' . r . cnt . s
else else
call feedkeys(r . cnt, 'n') call feedkeys(r . cnt, 'ni')
call feedkeys(s) call feedkeys(s, 'i')
endif endif
else else
if (v:version > 703 || (v:version == 703 && has('patch100'))) if ((v:version == 703 && has('patch100')) || (v:version == 704 && !has('patch601')))
exe 'norm! '.(a:count ? a:count : '') . '.' exe 'norm! '.(a:count ? a:count : '') . '.'
else else
call feedkeys((a:count ? a:count : '') . '.', 'n') call feedkeys((a:count ? a:count : '') . '.', 'ni')
endif endif
endif endif
endfunction endfunction