updated for version 7.4.099 v7.4.099
authorBram Moolenaar <Bram@vim.org>
Thu, 21 Nov 2013 13:40:04 +0000 (14:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 21 Nov 2013 13:40:04 +0000 (14:40 +0100)
Problem:    Append in blockwise Visual mode with "$" is wrong.
Solution:   After "$" don't use the code that checks if the cursor was moved.
            (Hirohito Higashi, Ken Takata)

src/ops.c
src/testdir/test39.in
src/testdir/test39.ok
src/version.c

index e1048c255470392f085cb628f0ab24cd03c69b86..d2060a47e83890a8c007ae3ccc7bbfa3b709203b 100644 (file)
--- a/src/ops.c
+++ b/src/ops.c
@@ -2643,7 +2643,7 @@ op_insert(oap, count1)
 
        /* The user may have moved the cursor before inserting something, try
         * to adjust the block for that. */
-       if (oap->start.lnum == curbuf->b_op_start.lnum)
+       if (oap->start.lnum == curbuf->b_op_start.lnum && !bd.is_MAX)
        {
            if (oap->op_type == OP_INSERT
                    && oap->start.col != curbuf->b_op_start.col)
index 77e2bd76893b8c980a3564fa670ab76388670779..4f42a13a5ead47aa5e1f1afb8b66cb280c3d4d3f 100644 (file)
@@ -23,6 +23,18 @@ G$khhh\16hhkkcmno\e
 /^aaaa/
 :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right>  \<Esc>"
 :/^aa/,/^$/w >> test.out
+:" Test for Visual block was created with the last <C-v>$
+/^A23$/
+:exe ":norm! l\<C-V>j$Aab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block was created with the middle <C-v>$ (1)
+/^B23$/
+:exe ":norm! l\<C-V>j$hAab\<Esc>"
+:.,/^$/w >> test.out
+:" Test for Visual block was created with the middle <C-v>$ (2)
+/^C23$/
+:exe ":norm! l\<C-V>j$hhAab\<Esc>"
+:.,/^$/w >> test.out
 :" gUe must uppercase a whole word, also when ß changes to SS
 Gothe youtußeuu end\eYpk0wgUe
 :" gUfx must uppercase until x, inclusive.
@@ -49,6 +61,15 @@ bbbbbb
 cccccc
 dddddd
 
+A23
+4567
+
+B23
+4567
+
+C23
+4567
+
 abcdefghijklm
 abcdefghijklm
 abcdefghijklm
index 4964d6a34b93691f1a8530296cb2a2994973317a..3469f52b65c944c6d79c39b21ee2eb6b12739030 100644 (file)
Binary files a/src/testdir/test39.ok and b/src/testdir/test39.ok differ
index 505e227f9c4d368d771b7c0b6a7c301bbef7d9fd..7f9ae8b7ebf963f1d1061786d36165a15fd4f331 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    99,
 /**/
     98,
 /**/