vim-operator-replace icon indicating copy to clipboard operation
vim-operator-replace copied to clipboard

Remove a blank line when a regtype is 'V' and a text object is entire buffer

Open rhysd opened this issue 11 years ago • 1 comments

When a regtype is 'V' and the object is entire buffer, a blank line remains at the top of buffer because a buffer of Vim has at least one line for the place of cursor. This problem often occurs when using vim-textobj-entire.

Before text is:

hoge huga

Then, do:

:call setreg('s', 'aaa', 'V') | execute 'normal' "V\"s\<Plug>(operator-replace)"

After text is:


aaa

This commit fixes the issue by dirty workaround. I've added a test case to confirm that the issue is fixed.

rhysd avatar Oct 02 '13 14:10 rhysd

@kana I am also troubled by this behavior. What is blocking this PR?

thinca avatar Jun 23 '20 08:06 thinca