Mercurial > vim
comparison 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 |
comparison
equal
deleted
inserted
replaced
28396:cf018ac0499c | 28397:d1702731786c |
---|---|
2033 */ | 2033 */ |
2034 static void | 2034 static void |
2035 set_terminal_mode(term_T *term, int normal_mode) | 2035 set_terminal_mode(term_T *term, int normal_mode) |
2036 { | 2036 { |
2037 term->tl_normal_mode = normal_mode; | 2037 term->tl_normal_mode = normal_mode; |
2038 trigger_modechanged(); | 2038 may_trigger_modechanged(); |
2039 if (!normal_mode) | 2039 if (!normal_mode) |
2040 handle_postponed_scrollback(term); | 2040 handle_postponed_scrollback(term); |
2041 VIM_CLEAR(term->tl_status_text); | 2041 VIM_CLEAR(term->tl_status_text); |
2042 if (term->tl_buffer == curbuf) | 2042 if (term->tl_buffer == curbuf) |
2043 maketitle(); | 2043 maketitle(); |