--- Begin Message ---
> Hi Marcin!
> 
> On So, 15 Apr 2012, Marcin Szamotulski wrote:
> 
> > Dear vim_dev,
> > 
> > I found the following behaviour of "- register (tested using "vim -u NONE 
> > --noplugin")
> > 
> > When the 'clipboard' is set to the default (i.e.
> > "autoselect,exclude:cons\|linux") deleting parts of the line puts the 
> > deleted
> > contents into "- register just fine. But if 'clipboard' is set to "unnamed" 
> > or
> > "unnamedplus" the contents is not put into "- register.
> > 
> > Tested on vim (command line, version 7.3.495, uxterm) and gvim (version 
> > 7.3.487) (both
> > on GNU/Linux).
> 
> This patch fixes it:
> 
> diff --git a/src/ops.c b/src/ops.c
> --- a/src/ops.c
> +++ b/src/ops.c
> @@ -1722,8 +1722,13 @@
>  
>         /* Yank into small delete register when no register specified and the
>          * delete is within one line. */
> -       if (oap->regname == 0 && oap->motion_type != MLINE
> -                                                     && oap->line_count == 1)
> +       if ((
> +#ifdef FEAT_CLIPBOARD
> +            (clip_unnamed == CLIP_UNNAMED && oap->regname == '*') ||
> +            (clip_unnamed == CLIP_UNNAMED_PLUS && oap->regname == '+') ||
> +#endif
> +            oap->regname == 0)
> +               && oap->motion_type != MLINE && oap->line_count == 1)
>         {
>             oap->regname = '-';
>             get_yank_register(oap->regname, TRUE);
> 
> 
> regards,
> Christian

This patch works for
    set cb=unnamed
or
    set cb=unnamedplus
but it fails to work for
    set cb=unnamed,unnamedplus

I found that yanking is also affected.

Best,
Marcin

--- End Message ---

Raspunde prin e-mail lui