diff options
Diffstat (limited to 'src/edit.c')
-rw-r--r-- | src/edit.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/edit.c b/src/edit.c index 8243890c5..ee63daa1c 100644 --- a/src/edit.c +++ b/src/edit.c @@ -6916,8 +6916,12 @@ stop_insert(end_insert_pos, esc, nomove) } if (curwin->w_cursor.lnum != tpos.lnum) curwin->w_cursor = tpos; - else if (cc != NUL) - ++curwin->w_cursor.col; /* put cursor back on the NUL */ + else + { + tpos.col++; + if (cc != NUL && gchar_pos(&tpos) == NUL) + ++curwin->w_cursor.col; /* put cursor back on the NUL */ + } /* <C-S-Right> may have started Visual mode, adjust the position for * deleted characters. */ |