Skip to content

Conversation

@rhysd
Copy link

@rhysd rhysd commented Oct 2, 2013

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.

… buffer

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 commit fixes the issue by dirty workaround.
@thinca
Copy link

thinca commented Jun 23, 2020

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

yuki-yano added a commit to yuki-yano/vim-operator-replace that referenced this pull request Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants