aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/terminal.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-04-10 07:20:35 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-04-10 08:02:22 +0800
commit263a7fde35f2341f526a536690122b927300021a (patch)
tree99339f45da62e1054f9384f102e686b557c02c40 /src/nvim/terminal.c
parentff726cc569994aab61a42c40270e679dc80cca7c (diff)
downloadrneovim-263a7fde35f2341f526a536690122b927300021a.tar.gz
rneovim-263a7fde35f2341f526a536690122b927300021a.tar.bz2
rneovim-263a7fde35f2341f526a536690122b927300021a.zip
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(). https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f Make v:event readonly for ModeChanged.
Diffstat (limited to 'src/nvim/terminal.c')
-rw-r--r--src/nvim/terminal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c
index 5c8789ec37..f4baa92f5b 100644
--- a/src/nvim/terminal.c
+++ b/src/nvim/terminal.c
@@ -422,7 +422,7 @@ void terminal_enter(void)
curwin->w_redr_status = true; // For mode() in statusline. #8323
ui_busy_start();
apply_autocmds(EVENT_TERMENTER, NULL, NULL, false, curbuf);
- trigger_modechanged();
+ may_trigger_modechanged();
s->state.execute = terminal_execute;
s->state.check = terminal_check;