Merge pull request #36 from justinmk/norm

Use :norm for Vim 7.3.100 or later
This commit is contained in:
Tim Pope 2015-01-19 14:42:53 -06:00
commit 7f09c18d2e

View File

@ -89,10 +89,18 @@ 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 : ''))
call feedkeys(r . cnt, 'n') if (v:version > 703 || (v:version == 703 && has('patch100')))
call feedkeys(s) exe 'norm ' . r . cnt . s
elseif
call feedkeys(r . cnt, 'n')
call feedkeys(s)
endif
else else
call feedkeys((a:count ? a:count : '') . '.', 'n') if (v:version > 703 || (v:version == 703 && has('patch100')))
exe 'norm! '.(a:count ? a:count : '') . '.'
elseif
call feedkeys((a:count ? a:count : '') . '.', 'n')
endif
endif endif
endfunction endfunction