Hi Andrew!

On Di, 13 Mai 2014, Andrew wrote:

> With Christian's patch, it seems like this doesn't work. The plugin
> uses the default register regardless of how I invoke the paste
> mapping. If I understand what Ingo's saying, any normal-mode command,
> including :, should clear v:register. If this is what Christian's
> patch is doing, it would explain why v:register is lost in the above
> case.

Yes, that is basically what my patch does. It resets v:register when 
finishing up a normal mode command. That was why I originally asked for 
a reproducible example, because I feared, something like this would 
happen (v:register not visible anymore in ex commands).

> And I think it's a pretty common use case to build up a <Plug> mapping 
>by calling a command or function. In fact, if : resets v:register, I'm 
>not sure how it would even be possible to access that variable in order 
>to save it.
> 
> The way I *think* it should work is: Particular operators like d, y, p 
> "consume" a register. Once they're done, the v:register can safely be reset 
> to the default. As Ingo says, typing "xyy should reset v:register, but typing 
> "x: should not, since the register was just left hanging for the next 
> operations.
> 
> At least that's how I see the "correct" functionality, but I'm starting to 
> feel pretty confused about edge cases. Can anybody say whether my line of 
> thinking is in the right direction?

No opinion on that. If we reach some agreement on how to make it work, I 
might propose another patch then.

Mit freundlichen Grüßen
Christian
-- 
Die Weiber ändern ihre Meinungen schwerer als die Männer, weil sie
mehr Gefühle als Schlüsse sind.
                -- Jean Paul

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