mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 8.2.3430: no generic way to trigger an autocommand on mode change
Problem: No generic way to trigger an autocommand on mode change. Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes #8856)
This commit is contained in:
committed by
Bram Moolenaar
parent
464393a696
commit
f1e8876fa2
@@ -688,6 +688,8 @@ extern int (*dyn_libintl_wputenv)(const wchar_t *envstring);
|
||||
#define TERMINAL 0x2000 // Terminal mode
|
||||
#define MODE_ALL 0xffff
|
||||
|
||||
#define MODE_MAX_LENGTH 4 // max mode length returned in mode()
|
||||
|
||||
// all mode bits used for mapping
|
||||
#define MAP_ALL_MODES (0x3f | SELECTMODE | TERMINAL)
|
||||
|
||||
@@ -1317,6 +1319,7 @@ enum auto_event
|
||||
EVENT_INSERTLEAVEPRE, // just before leaving Insert mode
|
||||
EVENT_INSERTLEAVE, // just after leaving Insert mode
|
||||
EVENT_MENUPOPUP, // just before popup menu is displayed
|
||||
EVENT_MODECHANGED, // after changing the mode
|
||||
EVENT_OPTIONSET, // option was set
|
||||
EVENT_QUICKFIXCMDPOST, // after :make, :grep etc.
|
||||
EVENT_QUICKFIXCMDPRE, // before :make, :grep etc.
|
||||
|
Reference in New Issue
Block a user