diff options
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index a4c4bf4ce8..ea38221dc7 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -9129,7 +9129,8 @@ static int ins_apply_autocmds(event_T event) // If u_savesub() was called then we are not prepared to start // a new line. Call u_save() with no contents to fix that. - if (tick != buf_get_changedtick(curbuf)) { + // Except when leaving Insert mode. + if (event != EVENT_INSERTLEAVE && tick != buf_get_changedtick(curbuf)) { u_save(curwin->w_cursor.lnum, (linenr_T)(curwin->w_cursor.lnum + 1)); } |