aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_cmds2.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-02 20:39:24 +0800
committerGitHub <noreply@github.com>2022-12-02 20:39:24 +0800
commit1145a9b2485a4e5072cffe28a958da983cd59e84 (patch)
tree13059f09a9825a7eae3d75c8556436845dc1e492 /src/nvim/ex_cmds2.c
parent805c83f43e3d6832a54bc4a1de1dd4d4da43d58e (diff)
downloadrneovim-1145a9b2485a4e5072cffe28a958da983cd59e84.tar.gz
rneovim-1145a9b2485a4e5072cffe28a958da983cd59e84.tar.bz2
rneovim-1145a9b2485a4e5072cffe28a958da983cd59e84.zip
feat(aucmd_win): allow crazy things with hidden buffers (#21250)
Problem: Crash when doing crazy things with hidden buffers. Solution: Dynamically allocate the list of autocommand windows.
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r--src/nvim/ex_cmds2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c
index d3c0c417e1..b6489e97b2 100644
--- a/src/nvim/ex_cmds2.c
+++ b/src/nvim/ex_cmds2.c
@@ -683,10 +683,8 @@ void ex_listdo(exarg_T *eap)
curbuf);
} else {
aucmd_prepbuf(&aco, buf);
- if (curbuf == buf) {
- apply_autocmds(EVENT_SYNTAX, buf->b_p_syn, buf->b_fname, true, buf);
- aucmd_restbuf(&aco);
- }
+ apply_autocmds(EVENT_SYNTAX, buf->b_p_syn, buf->b_fname, true, buf);
+ aucmd_restbuf(&aco);
}
// start over, in case autocommands messed things up.