fix(renderer): Fix option check for highligt_opened_files (#352)

This commit is contained in:
Sindre T. Strøm
2021-05-17 21:56:39 +02:00
committed by GitHub
parent b8c5a089fa
commit f09143900b

View File

@@ -314,7 +314,7 @@ local function update_draw_data(tree, depth, markers)
table.insert(hl, {'NvimTreeImageFile', index, offset+#icon+#git_icons, -1 })
end
if vim.g.nvim_tree_highlight_opened_files then
if vim.g.nvim_tree_highlight_opened_files == 1 then
if vim.fn.bufloaded(node.absolute_path) > 0 then
table.insert(hl, {'NvimTreeOpenedFile', index, offset, offset+#icon })
end