Revert "chore: use api to check if buf is loaded"
This reverts commit db91909f5b.
fixes #1182
This commit is contained in:
parent
db91909f5b
commit
ce463a53ae
@ -208,7 +208,7 @@ local function update_draw_data(tree, depth, markers)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if should_hl_opened_files then
|
if should_hl_opened_files then
|
||||||
if api.nvim_buf_is_loaded(node.absolute_path) then
|
if vim.fn.bufloaded(node.absolute_path) > 0 then
|
||||||
if vim.g.nvim_tree_highlight_opened_files == 1 then
|
if vim.g.nvim_tree_highlight_opened_files == 1 then
|
||||||
table.insert(hl, { "NvimTreeOpenedFile", index, offset, offset + #icon }) -- highlight icon only
|
table.insert(hl, { "NvimTreeOpenedFile", index, offset, offset + #icon }) -- highlight icon only
|
||||||
elseif vim.g.nvim_tree_highlight_opened_files == 2 then
|
elseif vim.g.nvim_tree_highlight_opened_files == 2 then
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user