tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.59k stars 81 forks source link

Fix adding trailing spaces when 'virtualedit' isn't empty #4

Closed xaizek closed 12 years ago

xaizek commented 12 years ago

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.

I found this issue while using vim-commentary. It's quite annoying when trailing spaces appear almost each time I comment or uncomment one line.

I'm not a VimL expert at all, so I think you could know a better fix for the issue.

tpope commented 12 years ago

Thanks. I can't think of a better fix off the top of my head.