refactor(#2826): singleton View class, WIP

This commit is contained in:
Alexander Courtis
2025-04-20 13:54:37 +10:00
parent a3fe0c9007
commit 9d3d0d220f
15 changed files with 84 additions and 80 deletions

View File

@@ -67,9 +67,9 @@ local function move(explorer, where, what, skip_gitignored)
end
if nex then
view.set_cursor({ nex, 0 })
view.View:set_cursor({ nex, 0 })
elseif vim.o.wrapscan and first then
view.set_cursor({ first, 0 })
view.View:set_cursor({ first, 0 })
end
end
@@ -189,13 +189,13 @@ local function move_prev_recursive(explorer, what, skip_gitignored)
-- 4.3)
if node_init.name == ".." then -- root node
view.set_cursor({ 1, 0 }) -- move to root node (position 1)
view.View:set_cursor({ 1, 0 }) -- move to root node (position 1)
else
local node_init_line = utils.find_node_line(node_init)
if node_init_line < 0 then
return
end
view.set_cursor({ node_init_line, 0 })
view.View:set_cursor({ node_init_line, 0 })
end
-- 4.4)