fix: Implicit current buf on centralize selection (#1792)

This commit is contained in:
David
2022-12-12 13:14:41 +01:00
committed by GitHub
parent a2c75567ad
commit 0cd8ac4751

View File

@@ -424,9 +424,8 @@ local function setup_autocommands(opts)
create_nvim_tree_autocmd("BufEnter", {
pattern = "NvimTree_*",
callback = function()
local bufnr = vim.api.nvim_get_current_buf()
vim.schedule(function()
vim.api.nvim_buf_call(bufnr, function()
vim.api.nvim_buf_call(0, function()
vim.cmd [[norm! zz]]
end)
end)