]> granicus.if.org Git - vim/commitdiff
patch 7.4.1296 v7.4.1296
authorBram Moolenaar <Bram@vim.org>
Tue, 9 Feb 2016 20:24:46 +0000 (21:24 +0100)
committerBram Moolenaar <Bram@vim.org>
Tue, 9 Feb 2016 20:24:46 +0000 (21:24 +0100)
Problem:    Cursor changes column with up motion when the matchparen plugin
            saves and restores the cursor position. (Martin Kunev)
Solution:   Make sure curswant is updated before invoking the autocommand.

src/edit.c
src/version.c

index 4edf4f4f67ebbb8853f17f04748fe1b6a830ed63..344f3793accbd3fb0b6d0d503afc3871554e8b7b 100644 (file)
@@ -1611,7 +1611,12 @@ ins_redraw(
 # endif
 # ifdef FEAT_AUTOCMD
        if (has_cursormovedI())
+       {
+           /* Make sure curswant is correct, an autocommand may call
+            * getcurpos(). */
+           update_curswant();
            apply_autocmds(EVENT_CURSORMOVEDI, NULL, NULL, FALSE, curbuf);
+       }
 # endif
 # ifdef FEAT_CONCEAL
        if (curwin->w_p_cole > 0)
index 491b94a98ce0cfdc214359fc76a650cf5e27f523..131ef4bc1a07a5de649f20a54c6d5c8fbc03dbe8 100644 (file)
@@ -747,6 +747,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1296,
 /**/
     1295,
 /**/