refactor(#2826): singleton View class, WIP
This commit is contained in:
@@ -486,7 +486,7 @@ function Explorer:reload_explorer()
|
||||
|
||||
local projects = git.reload_all_projects()
|
||||
self:refresh_nodes(projects)
|
||||
if view.is_visible() then
|
||||
if view.View:is_visible() then
|
||||
self.renderer:draw()
|
||||
end
|
||||
event_running = false
|
||||
|
||||
@@ -204,7 +204,7 @@ function LiveFilter:start_filtering()
|
||||
self.explorer.renderer:draw()
|
||||
local row = require("nvim-tree.core").get_nodes_starting_line() - 1
|
||||
local col = #self.prefix > 0 and #self.prefix - 1 or 1
|
||||
view.set_cursor({ row, col })
|
||||
view.View:set_cursor({ row, col })
|
||||
-- needs scheduling to let the cursor move before initializing the window
|
||||
vim.schedule(function()
|
||||
return create_overlay(self)
|
||||
|
||||
Reference in New Issue
Block a user