]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.318 v7.3.318
authorBram Moolenaar <Bram@vim.org>
Wed, 21 Sep 2011 15:33:53 +0000 (17:33 +0200)
committerBram Moolenaar <Bram@vim.org>
Wed, 21 Sep 2011 15:33:53 +0000 (17:33 +0200)
Problem:    "C" on the last line deletes that line if it's blank.
Solution:   Only delete the last line for a delete operation. (James Vega)

src/ops.c
src/version.c

index 41193566dbb5e5ebcc416dca260c81e7d05c22b1..656285a50fabe0a87021704d81dc208716f7e948 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -1922,7 +1922,9 @@ op_delete(oap)
                    curwin->w_cursor.coladd = 0;
            }
 #endif
-           if (oap->inclusive && oap->end.lnum == curbuf->b_ml.ml_line_count
+           if (oap->op_type == OP_DELETE
+                   && oap->inclusive
+                   && oap->end.lnum == curbuf->b_ml.ml_line_count
                    && n > (int)STRLEN(ml_get(oap->end.lnum)))
            {
                /* Special case: gH<Del> deletes the last line. */
@@ -3331,8 +3333,8 @@ do_put(regname, dir, count, flags)
        if (regname == '=')
        {
            /* For the = register we need to split the string at NL
-            * characters. */
-           /* Loop twice: count the number of lines and save them. */
+            * characters.
+            * Loop twice: count the number of lines and save them. */
            for (;;)
            {
                y_size = 0;
@@ -3348,7 +3350,7 @@ do_put(regname, dir, count, flags)
                        if (y_array != NULL)
                            *ptr = NUL;
                        ++ptr;
-                       /* A trailing '\n' makes the string linewise */
+                       /* A trailing '\n' makes the register linewise. */
                        if (*ptr == NUL)
                        {
                            y_type = MLINE;
index 35ed103da0a4934fde68b7ac9a1f3611c9a6a980..a22a46048df001bb6d4334b3c795d69d0b458648 100644 (file)
@@ -709,6 +709,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    318,
 /**/
     317,
 /**/