We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd47644 commit 7cbd608Copy full SHA for 7cbd608
lua/nvim-tree.lua
@@ -406,10 +406,9 @@ local function setup_autocommands(opts)
406
if opts.view.centralize_selection then
407
create_nvim_tree_autocmd("BufEnter", {
408
pattern = "NvimTree_*",
409
- callback = function()
+ callback = function(event)
410
vim.schedule(function()
411
- local bufnr = vim.api.nvim_get_current_buf()
412
- vim.api.nvim_buf_call(bufnr, function()
+ vim.api.nvim_buf_call(event.buf, function()
413
vim.cmd [[norm! zz]]
414
end)
415
0 commit comments