Mercurial > vim
changeset 6363:e6c5ff35500d v7.4.514
updated for version 7.4.514
Problem: Memory access error. (Dominique Pelle)
Solution: Update tpos. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 12 Nov 2014 18:59:25 +0100 |
parents | d11d3702fbda |
children | 436a29956f6d |
files | src/edit.c src/version.c |
diffstat | 2 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 */