aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
authorFlorian Walch <florian@fwalch.com>2015-01-23 13:13:12 +0100
committerJustin M. Keyes <justinkz@gmail.com>2015-01-26 02:19:14 -0500
commit51aacc2dea9858228fd387c91d7261b86f0df652 (patch)
tree8ad69098d72243318717f91498a817322ec2e15f /src/nvim/edit.c
parent0f2d02569cd41e1ffac4195ec47b1ca9b3f08418 (diff)
downloadrneovim-51aacc2dea9858228fd387c91d7261b86f0df652.tar.gz
rneovim-51aacc2dea9858228fd387c91d7261b86f0df652.tar.bz2
rneovim-51aacc2dea9858228fd387c91d7261b86f0df652.zip
vim-patch:7.4.514
Problem: Memory access error. (Dominique Pelle) Solution: Update tpos. (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=v7-4-514
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 03dceaf092..df45f57606 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -5752,6 +5752,8 @@ stop_insert (
if (curwin->w_cursor.lnum != tpos.lnum)
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