changeset 6138:3f92ef156c66 v7.4.407

updated for version 7.4.407 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)
author Bram Moolenaar <bram@vim.org>
date Sat, 16 Aug 2014 18:13:03 +0200
parents 12ecdad8c903
children 70d1c941dfd0
files src/edit.c src/testdir/test39.in src/testdir/test39.ok src/version.c
diffstat 4 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/edit.c
+++ b/src/edit.c
@@ -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)
--- a/src/testdir/test39.in
+++ b/src/testdir/test39.in
@@ -23,6 +23,9 @@ G$khhhhhkkcmno
 /^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
GIT binary patch
literal 514
zc$|e!-AcnS6!vxpe24P_1CzAtHbmHLVS?C;HK3RI>o)CL1q-b&>#KMYrfy~8x%j?(
zKRJo&`VVcaD>vKS^Gme{MaCNqBJS&EgkgrED}9LgSGu7zIJDY3hg>N{0?=9`5`ZxV
zkpQf<hy(!FuQ#3V5Nlr{Hoie@Lt(*%(h$Xygb0>g;E}xj4wX&-4*%<LRPAcV2AU7F
z0C?Xze9C1Z*XvA5bhU*s_BqL5J+?T8VwD|tvWFBHV`tpu{bGgb9i%ytEP!+F_xH_7
rO9=6E_tUj)c$9Gw#gI&AXHT=~<s?4A|N0l9`HQBh<`Fh!IlqE0eAI}c
--- a/src/version.c
+++ b/src/version.c
@@ -742,6 +742,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    407,
+/**/
     406,
 /**/
     405,