On Wed, Mar 16, 2011 at 02:52:19PM -0700, Jean Johner wrote: > Hello, > Zero comment on the below thread in vim_use. > I think it is a bug. > > Best regards > > Jean Johner > > >Hello, > >Using gvim in unix, "a" is by default in guioptions. > >Yanking a word to the Unix clipboard (with "+yw) does not yank the > >word to the Selection buffer ("*). > > >When suppressing the "a" option (with set guioptions-=a), yanking a > >word to the Unix clipboard (with "+yw) also yanks the word to the > >Selection buffer ("*). > > > >Is there a reason for this behaviour or is it a bug ?
This was introduced with the unnamedplus setting for 'clipboard' in patch 7.3.074. The behavior I expect, according to the documentation, is that "* will only mirror "+'s content when both "unnamed" and "unnamedplus" are present in 'clipboard' and 'guioptions' doesn't contain "a". The attached patch should implement that behavior. -- James GPG Key: 1024D/61326D40 2003-09-02 James Vega <james...@debian.org>
diff --git a/src/ops.c b/src/ops.c --- a/src/ops.c +++ b/src/ops.c @@ -3151,7 +3151,8 @@ /* No need to copy to * register upon 'unnamed' now - see below */ clip_own_selection(&clip_plus); clip_gen_set_selection(&clip_plus); - if (!clip_isautosel() && !did_star) + if (!clip_isautosel() && (clip_unnamed & CLIP_UNNAMED) + && (clip_unnamed & CLIP_UNNAMED_PLUS) && !did_star) { copy_yank_reg(&(y_regs[STAR_REGISTER])); clip_own_selection(&clip_star);
signature.asc
Description: Digital signature