Hi
When you yank something into a named register the value of the internal
variable 'v:register' doesn't change back to the default register after the
yank. The next mapping using 'v:register' after such yank will see
'v:register' contain the register used by the initial yank operation, which
contradicts the description in ':h v:register'. 'v:register' only gets
updated when some operation like moving the cursor or changing the window
is performed after the initial yank.
Example - Vim 7.4 (Windows):
Write some text in the buffer.
Type the commands:
"_dl:echo 'v:register'
will show '_' as opposed to '"', even though the current command (':echo')
didn't use any register. Moving the cursor after the delete and then
checking 'v:register' correctly yields '"'
This is obviously troublesome for plugins that rely on 'v:register' to
paste something, they end up pasting from the blackhole register for
example.
--
Sampo Osmonen
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.