fix(#3101): only redraw renderer.highlight_opened_files during BufUnload and BufReadPost

This commit is contained in:
Alexander Courtis 2025-04-07 10:40:02 +10:00
parent af01d64b5c
commit 0227ce97ed

View File

@ -134,7 +134,7 @@ function Explorer:create_autocmds()
end) end)
elseif self.opts.renderer.highlight_opened_files ~= "none" then elseif self.opts.renderer.highlight_opened_files ~= "none" then
-- draw to update opened highlight; must be delayed as the buffer is still loaded during BufUnload -- draw to update opened highlight; must be delayed as the buffer is still loaded during BufUnload
utils.debounce("Buf:highlight_opened_files_" .. self.uid_explorer, self.opts.view.debounce_delay, function() vim.schedule(function()
self.renderer:draw() self.renderer:draw()
end) end)
end end