mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 01:16:31 +00:00
vim-patch:8.2.4723: the ModeChanged autocmd event is inefficient
Problem: The ModeChanged autocmd event is inefficient.
Solution: Avoid allocating memory. (closes vim/vim#10134) Rename
trigger_modechanged() to may_trigger_modechanged().
2bf52dd065
Make v:event readonly for ModeChanged.
This commit is contained in:
@@ -746,7 +746,11 @@ EXTERN bool listcmd_busy INIT(= false); // set when :argdo, :windo or
|
||||
// :bufdo is executing
|
||||
EXTERN bool need_start_insertmode INIT(= false);
|
||||
// start insert mode soon
|
||||
EXTERN char *last_mode INIT(= NULL);
|
||||
|
||||
#define MODE_MAX_LENGTH 4 // max mode length returned in get_mode()
|
||||
// including the final NUL character
|
||||
|
||||
EXTERN char last_mode[MODE_MAX_LENGTH] INIT(= "n");
|
||||
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
|
||||
|
Reference in New Issue
Block a user