neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit f40672be99356d453fba6e2b4239c1876cd1b9dd
parent 9b03385d85424345c903f52366c604fa6db73e65
Author: phanium <91544758+phanen@users.noreply.github.com>
Date:   Sat, 11 Oct 2025 12:09:51 +0800

fix(undotree): clear autocmd correctly #36124

Problem: nvim_clear_autocmds clear some other autocmd unexpectedly

Solution: clear it correctly
Diffstat:
Mruntime/pack/dist/opt/nvim.undotree/lua/undotree.lua | 4+---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua b/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua @@ -371,9 +371,7 @@ function M.open(opts) vim.api.nvim_win_set_cursor(w, { vim.api.nvim_buf_line_count(b), 0 }) - local group = vim.api.nvim_create_augroup('nvim.undotree', { clear = false }) - vim.api.nvim_clear_autocmds({ buffer = b }) - vim.api.nvim_clear_autocmds({ buffer = buf }) + local group = vim.api.nvim_create_augroup('nvim.undotree', {}) vim.api.nvim_win_call(w, function() vim.cmd.syntax('region Comment start="(" end=")"')