fix(#1545): dispatch Event.Resize on all window resizes, requires nvim 0.9+ (#2238)

This commit is contained in:
Alexander Courtis
2023-06-10 16:58:29 +10:00
committed by GitHub
parent 8d82c4dbe1
commit 034511714b
3 changed files with 22 additions and 2 deletions

View File

@@ -434,7 +434,7 @@ function M.is_nvim_tree_buf(bufnr)
if bufnr == nil then
bufnr = 0
end
if vim.fn.bufexists(bufnr) then
if vim.api.nvim_buf_is_valid(bufnr) then
local bufname = vim.api.nvim_buf_get_name(bufnr)
if vim.fn.fnamemodify(bufname, ":t"):match "^NvimTree_[0-9]+$" then
if vim.bo[bufnr].filetype == "NvimTree" then