diff options
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/edit.c b/src/edit.c index ee63daa1c..13faafeb7 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 */ |