diff src/terminal.c @ 28397:d1702731786c v8.2.4723

patch 8.2.4723: the ModeChanged autocmd event is inefficient Commit: https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f Author: LemonBoy <thatlemon@gmail.com> Date: Sat Apr 9 18:17:34 2022 +0100 patch 8.2.4723: the ModeChanged autocmd event is inefficient Problem: The ModeChanged autocmd event is inefficient. Solution: Avoid allocating memory. (closes https://github.com/vim/vim/issues/10134) Rename trigger_modechanged() to may_trigger_modechanged().
author Bram Moolenaar <Bram@vim.org>
date Sat, 09 Apr 2022 19:30:02 +0200
parents 62cc3b60493b
children 16bd027b039e
line wrap: on
line diff
--- a/src/terminal.c
+++ b/src/terminal.c
@@ -2035,7 +2035,7 @@ term_check_timers(int next_due_arg, prof
 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);