Skip to content

Commit 586e42b

Browse files
committed
fix(#3101): fix bad reference to renderer.highlight_opened_files during BufUnload and BufReadPost
1 parent c3c1935 commit 586e42b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lua/nvim-tree/explorer/init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function Explorer:create_autocmds()
101101
vim.api.nvim_create_autocmd("BufReadPost", {
102102
group = self.augroup_id,
103103
callback = function(data)
104-
if (self.filters.state.no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
104+
if (self.filters.state.no_buffer or self.opts.renderer.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
105105
utils.debounce("Buf:filter_buffer_" .. self.uid_explorer, self.opts.view.debounce_delay, function()
106106
self:reload_explorer()
107107
end)
@@ -113,7 +113,7 @@ function Explorer:create_autocmds()
113113
vim.api.nvim_create_autocmd("BufUnload", {
114114
group = self.augroup_id,
115115
callback = function(data)
116-
if (self.filters.state.no_buffer or self.opts.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
116+
if (self.filters.state.no_buffer or self.opts.renderer.highlight_opened_files ~= "none") and vim.bo[data.buf].buftype == "" then
117117
utils.debounce("Buf:filter_buffer_" .. self.uid_explorer, self.opts.view.debounce_delay, function()
118118
self:reload_explorer()
119119
end)

0 commit comments

Comments
 (0)