0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.2.1874: can't do something just before leaving Insert mode

Problem:    Can't do something just before leaving Insert mode.
Solution:   Add the InsertLeavePre autocommand event. (closes #7177)
This commit is contained in:
Bram Moolenaar
2020-10-21 12:19:53 +02:00
parent 20d89e0ac6
commit b53e13a91a
6 changed files with 27 additions and 5 deletions

View File

@@ -3607,6 +3607,9 @@ ins_esc(
undisplay_dollar();
}
if (cmdchar != 'r' && cmdchar != 'v')
ins_apply_autocmds(EVENT_INSERTLEAVEPRE);
// When an autoindent was removed, curswant stays after the
// indent
if (restart_edit == NUL && (colnr_T)temp == curwin->w_cursor.col)