diff options
| author | phanium <91544758+phanen@users.noreply.github.com> | 2025-10-11 12:09:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-10 21:09:51 -0700 |
| commit | f40672be99356d453fba6e2b4239c1876cd1b9dd (patch) | |
| tree | 28bac0f093cf8abe8369af31406db39a10c5c5f0 /runtime/pack | |
| parent | 9b03385d85424345c903f52366c604fa6db73e65 (diff) | |
fix(undotree): clear autocmd correctly #36124
Problem: nvim_clear_autocmds clear some other autocmd unexpectedly
Solution: clear it correctly
Diffstat (limited to 'runtime/pack')
| -rw-r--r-- | runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua b/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua index d7eb00ce9e..724fdae31a 100644 --- 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=")"') |
