1
0
forked from aniani/vim

patch 8.2.4723: the ModeChanged autocmd event is inefficient

Problem:    The ModeChanged autocmd event is inefficient.
Solution:   Avoid allocating memory. (closes #10134)  Rename
            trigger_modechanged() to may_trigger_modechanged().
This commit is contained in:
LemonBoy
2022-04-09 18:17:34 +01:00
committed by Bram Moolenaar
parent 81b46a6ccd
commit 2bf52dd065
10 changed files with 137 additions and 141 deletions

View File

@@ -2035,7 +2035,7 @@ term_check_timers(int next_due_arg, proftime_T *now)
set_terminal_mode(term_T *term, int normal_mode)
{
term->tl_normal_mode = normal_mode;
trigger_modechanged();
may_trigger_modechanged();
if (!normal_mode)
handle_postponed_scrollback(term);
VIM_CLEAR(term->tl_status_text);