diff src/ops.c @ 3468:b1a42d2522fb v7.3.498

updated for version 7.3.498 Problem: The behavior of the "- register changes depending on value of the 'clipboard' option. (Szamotulski) Solution: Also set the "- register when the register is "*" or "+". (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Fri, 20 Apr 2012 13:46:08 +0200
parents fb2c5a51dac7
children 9a1dba1f969a
line wrap: on
line diff
--- a/src/ops.c
+++ b/src/ops.c
@@ -1720,9 +1720,14 @@ op_delete(oap)
 		did_yank = TRUE;
 	}
 
-	/* Yank into small delete register when no register specified and the
-	 * delete is within one line. */
-	if (oap->regname == 0 && oap->motion_type != MLINE
+	/* Yank into small delete register when no named register specified
+	 * and the delete is within one line. */
+	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 = '-';