]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
updated for version 7.4.407 v7.4.407
authorBram Moolenaar <Bram@vim.org>
Sat, 16 Aug 2014 16:13:03 +0000 (18:13 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 16 Aug 2014 16:13:03 +0000 (18:13 +0200)
Problem:    Inserting text for Visual block mode, with cursor movement,
            repeats the wrong text. (Aleksandar Ivanov)
Solution:   Reset the update_Insstart_orig flag. (Christian Brabandt)

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

index 6f30d81f603f992308a57fbd7d1421115d570c3f..29721afa33e4f6d7228edd8f6d33fc07afb7fe2e 100644 (file)
@@ -6768,13 +6768,19 @@ stop_arrow()
 {
     if (arrow_used)
     {
+       Insstart = curwin->w_cursor;    /* new insertion starts here */
+       if (Insstart.col > Insstart_orig.col && !ins_need_undo)
+           /* Don't update the original insert position when moved to the
+            * right, except when nothing was inserted yet. */
+           update_Insstart_orig = FALSE;
+       Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
+
        if (u_save_cursor() == OK)
        {
            arrow_used = FALSE;
            ins_need_undo = FALSE;
        }
-       Insstart = curwin->w_cursor;    /* new insertion starts here */
-       Insstart_textlen = (colnr_T)linetabsize(ml_get_curline());
+
        ai_col = 0;
 #ifdef FEAT_VREPLACE
        if (State & VREPLACE_FLAG)
index c1e1cc49a65205ed84314f493bc245ee499f2fa2..7d1c6725229a4abfbf38864bb183d096513a6b3f 100644 (file)
@@ -23,6 +23,9 @@ G$khhh\16hhkkcmno\e
 /^aaaa/
 :exe ":norm! l\<C-V>jjjlllI\<Right>\<Right>  \<Esc>"
 :/^aa/,/^$/w >> test.out
+/xaaa$/
+:exe ":norm! \<C-V>jjjI<>\<Left>p\<Esc>"
+:/xaaa$/,/^$/w >> test.out
 :" Test for Visual block was created with the last <C-v>$
 /^A23$/
 :exe ":norm! l\<C-V>j$Aab\<Esc>"
@@ -77,6 +80,11 @@ bbbbbb
 cccccc
 dddddd
 
+xaaa
+bbbb
+cccc
+dddd
+
 A23
 4567
 
index ef7a2c6442ca8ae973f2ca86e6105214a166180d..d8e901563af492e50b8f70c470fee5678644dc0c 100644 (file)
Binary files a/src/testdir/test39.ok and b/src/testdir/test39.ok differ
index 7e5b3cdd51660b9346f07cc09b286d057333415f..2b5dc454e58fa0d12b2d54339c945e66afc3f847 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    407,
 /**/
     406,
 /**/