# ifdef FEAT_X11
// If we were yanking to the '+' register, send result to selection.
- // Also copy to the '*' register, in case auto-select is off.
+ // Also copy to the '*' register, in case auto-select is off. But not when
+ // 'clipboard' has "unnamedplus" and not "unnamed".
if (clip_plus.available
&& (curr == &(y_regs[PLUS_REGISTER])
|| (!deleting && oap->regname == 0
&& ((clip_unnamed | clip_unnamed_saved) &
- CLIP_UNNAMED_PLUS))))
+ CLIP_UNNAMED_PLUS))))
{
if (curr != &(y_regs[PLUS_REGISTER]))
// Copy the text from register 0 to the clipboard register.
clip_own_selection(&clip_plus);
clip_gen_set_selection(&clip_plus);
- if (!clip_isautosel_star() && !clip_isautosel_plus()
- && !did_star && curr == &(y_regs[PLUS_REGISTER]))
+ if (!clip_isautosel_star()
+ && !clip_isautosel_plus()
+ && !((clip_unnamed | clip_unnamed_saved) == CLIP_UNNAMED_PLUS)
+ && !did_star
+ && curr == &(y_regs[PLUS_REGISTER]))
{
copy_yank_reg(&(y_regs[STAR_REGISTER]));
clip_own_selection(&clip_star);