summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-09 21:24:46 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-09 21:24:46 +0100
commitf068dcafcfe0c8018e5a559c50769ca1364bd9a5 (patch)
treeb0a2901665fb76e6f058ad208d4083fa3db4ffa3 /src/edit.c
parent4d8747cdfc13843a5680dc8340fbeb6d32e7b626 (diff)
patch 7.4.1296v7.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.
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c5
1 files changed, 5 insertions, 0 deletions
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)