From b53e13a91ab2fc9d52bd044715daa84972f4ce47 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 21 Oct 2020 12:19:53 +0200 Subject: 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) --- src/edit.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/edit.c') diff --git a/src/edit.c b/src/edit.c index e3e4624fb0..14a21d9573 100644 --- a/src/edit.c +++ b/src/edit.c @@ -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) -- cgit v1.2.3