diff options
author | =?UTF-8?q?Magnus=20Gro=C3=9F?= <magnus.gross@rwth-aachen.de> | 2021-09-12 13:39:55 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-09-12 13:39:55 +0200 |
commit | f1e8876fa2359b572d262772747405d3616db670 (patch) | |
tree | 1b33a32bccaa4522f14f2aad8ee8044295635d0b /src/globals.h | |
parent | 464393a6961d9b9de2bfe9c05f8e2ae5bdec0293 (diff) |
patch 8.2.3430: no generic way to trigger an autocommand on mode changev8.2.3430
Problem: No generic way to trigger an autocommand on mode change.
Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes #8856)
Diffstat (limited to 'src/globals.h')
-rw-r--r-- | src/globals.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/globals.h b/src/globals.h index b64e5cb613..1cbcf5c568 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1256,6 +1256,9 @@ EXTERN int listcmd_busy INIT(= FALSE); // set when :argdo, :windo or // :bufdo is executing EXTERN int need_start_insertmode INIT(= FALSE); // start insert mode soon +#if defined(FEAT_EVAL) || defined(PROTO) +EXTERN char_u last_mode[MODE_MAX_LENGTH] INIT(= "n"); // for ModeChanged event +#endif EXTERN char_u *last_cmdline INIT(= NULL); // last command line (for ":) EXTERN char_u *repeat_cmdline INIT(= NULL); // command line for "." EXTERN char_u *new_last_cmdline INIT(= NULL); // new value for last_cmdline |