From: Bram Moolenaar Date: Tue, 9 Feb 2016 20:24:46 +0000 (+0100) Subject: patch 7.4.1296 X-Git-Tag: v7.4.1296 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f068dcafcfe0c8018e5a559c50769ca1364bd9a5;p=thirdparty%2Fvim.git patch 7.4.1296 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. --- diff --git a/src/edit.c b/src/edit.c index 4edf4f4f67..344f3793ac 100644 --- a/src/edit.c +++ b/src/edit.c @@ -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) diff --git a/src/version.c b/src/version.c index 491b94a98c..131ef4bc1a 100644 --- a/src/version.c +++ b/src/version.c @@ -747,6 +747,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1296, /**/ 1295, /**/