Sampo Osmonen wrote:

> 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.

It's been like that forever.  I suspect some plugins actually rely on
v:register to keep its value.  I don't see how a command can depend on
v:register for a command that doesn't use a register.

-- 
WOMAN:   King of the who?
ARTHUR:  The Britons.
WOMAN:   Who are the Britons?
ARTHUR:  Well, we all are. we're all Britons and I am your king.
                                  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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.

Raspunde prin e-mail lui