Mercurial > vim
diff src/edit.c @ 22651:fba5ccf33794 v8.2.1874
patch 8.2.1874: can't do something just before leaving Insert mode
Commit: https://github.com/vim/vim/commit/b53e13a91ab2fc9d52bd044715daa84972f4ce47
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Oct 21 12:19:53 2020 +0200
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 https://github.com/vim/vim/issues/7177)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 21 Oct 2020 12:30:06 +0200 |
parents | 58cdc5d7f143 |
children | e82579016863 |
line wrap: on
line diff
--- 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)