# HG changeset patch # User Christian Brabandt # Date 1455049806 -3600 # Node ID 94798af62c567f9ff45633c2ac1cbc7a909ebaac # Parent 9a52de0281b52f0e007c38aab237106509f7332b commit https://github.com/vim/vim/commit/f068dcafcfe0c8018e5a559c50769ca1364bd9a5 Author: Bram Moolenaar Date: Tue Feb 9 21:24:46 2016 +0100 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 --- 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 --- a/src/version.c +++ b/src/version.c @@ -748,6 +748,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1296, +/**/ 1295, /**/ 1294,