Fix adding trailing spaces when 've' is not empty

The problem appears when cursor is positioned after line end, thus
running p command (even with empty "-register) causes Vim to add spaces
from line end until cursor.
This commit is contained in:
xaizek 2012-01-14 13:03:18 +02:00 committed by Tim Pope
parent cdffdd4381
commit 1118a8324f

View File

@ -38,7 +38,7 @@ let g:loaded_repeat = 1
let g:repeat_tick = -1
function! repeat#set(sequence,...)
silent exe "norm! \"=''\<CR>p"
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