summaryrefslogtreecommitdiff
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-08-16 18:13:03 +0200
committerBram Moolenaar <Bram@vim.org>2014-08-16 18:13:03 +0200
commit1fc7e972b00ce271328fcb2734a321562b7194da (patch)
treea740e385cce53dfffe16a5c3203c414297268a78 /src/edit.c
parent0ddd1b5e3568f3402d5e58ee054c9c412eab0b94 (diff)
downloadvim-git-1fc7e972b00ce271328fcb2734a321562b7194da.tar.gz
updated for version 7.4.407v7.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)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c10
1 files changed, 8 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)