Skip to content

Commit 237b90b

Browse files
committed
fix: implicit current buf on centralize selection
1 parent 829e9f6 commit 237b90b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lua/nvim-tree.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,8 @@ local function setup_autocommands(opts)
407407
create_nvim_tree_autocmd("BufEnter", {
408408
pattern = "NvimTree_*",
409409
callback = function()
410-
local bufnr = vim.api.nvim_get_current_buf()
411410
vim.schedule(function()
412-
vim.api.nvim_buf_call(bufnr, function()
411+
vim.api.nvim_buf_call(0, function()
413412
vim.cmd [[norm! zz]]
414413
end)
415414
end)

0 commit comments

Comments
 (0)