Skip to content

Commit 195f924

Browse files
committed
fix(explorer): get new explorer before redrawing on <C-]>
1 parent 189c036 commit 195f924

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lua/nvim-tree/explorer/init.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,12 @@ function Explorer:force_dirchange(foldername, should_open_view)
751751
if should_open_view then
752752
require("nvim-tree.lib").open()
753753
else
754-
self.renderer:draw()
754+
-- TODO #2255
755+
-- The call to core.init destroyed this Explorer instance hence we need to fetch the new instance.
756+
local explorer = core.get_explorer()
757+
if explorer then
758+
explorer.renderer:draw()
759+
end
755760
end
756761

757762
log.profile_end(profile)

0 commit comments

Comments
 (0)