summaryrefslogtreecommitdiffstats
path: root/src/edit.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2014-11-12 18:59:25 +0100
committerBram Moolenaar <Bram@vim.org>2014-11-12 18:59:25 +0100
commitef6875be7a0b4dde9589e69b0a0229c4b976c45b (patch)
treec89cac94fc685ca7ab617511727eabdaa8487ce5 /src/edit.c
parent42d84f8aed604e32e198a5fe31b3b7ab149ea63e (diff)
updated for version 7.4.514v7.4.514
Problem: Memory access error. (Dominique Pelle) Solution: Update tpos. (Christian Brabandt)
Diffstat (limited to 'src/edit.c')
-rw-r--r--src/edit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c
index ee63daa1c7..13faafeb78 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -6918,6 +6918,8 @@ stop_insert(end_insert_pos, esc, nomove)
curwin->w_cursor = tpos;
else
{
+ /* reset tpos, could have been invalidated in the loop above */
+ tpos = curwin->w_cursor;
tpos.col++;
if (cc != NUL && gchar_pos(&tpos) == NUL)
++curwin->w_cursor.col; /* put cursor back on the NUL */