summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/edit.c10
-rw-r--r--src/testdir/test39.in8
-rw-r--r--src/testdir/test39.okbin481 -> 514 bytes
-rw-r--r--src/version.c2
4 files changed, 18 insertions, 2 deletions
diff --git a/src/edit.c b/src/edit.c
index 6f30d81f6..29721afa3 100644
--- 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)
diff --git a/src/testdir/test39.in b/src/testdir/test39.in
index c1e1cc49a..7d1c67252 100644
--- 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
diff --git a/src/testdir/test39.ok b/src/testdir/test39.ok
index ef7a2c644..d8e901563 100644
--- a/src/testdir/test39.ok
+++ b/src/testdir/test39.ok
Binary files differ
diff --git a/src/version.c b/src/version.c
index 7e5b3cdd5..2b5dc454e 100644
--- 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,