]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.649 v7.3.649
authorBram Moolenaar <Bram@vim.org>
Wed, 5 Sep 2012 12:18:45 +0000 (14:18 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 5 Sep 2012 12:18:45 +0000 (14:18 +0200)
Problem:    When 'clipboard' is set to "unnamed" small deletes end up in the
            numbered registers. (Ingo Karkat)
Solution:   Use the original register name to decide whether to put a delete
            in a numbered register. (Christian Brabandt)

src/ops.c
src/version.c

index 561046d378047f15301f10757d4b43fdac19314d..f08e576cfead740d7dfe350475b8f35275335a7b 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -1623,6 +1623,7 @@ op_delete(oap)
 #endif
     linenr_T           old_lcount = curbuf->b_ml.ml_line_count;
     int                        did_yank = FALSE;
+    int                        orig_regname = oap->regname;
 
     if (curbuf->b_ml.ml_flags & ML_EMPTY)          /* nothing to do */
        return OK;
@@ -1715,8 +1716,10 @@ op_delete(oap)
        /*
         * Put deleted text into register 1 and shift number registers if the
         * delete contains a line break, or when a regname has been specified.
+        * Use the register name from before adjust_clip_reg() may have
+        * changed it.
         */
-       if (oap->regname != 0 || oap->motion_type == MLINE
+       if (orig_regname != 0 || oap->motion_type == MLINE
                                   || oap->line_count > 1 || oap->use_reg_one)
        {
            y_current = &y_regs[9];
index 577eddeafb3a2ac612e2c37eae55f6a9d9a98001..4b4890c7e0d134a2cab1171c9935bc9184d9563e 100644 (file)
@@ -719,6 +719,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    649,
 /**/
     648,
 /**/