Skip to content

Commit 14458e4

Browse files
committed
fix(#2878): nowrapscan prevents move from root
1 parent 762968a commit 14458e4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lua/nvim-tree/actions/moves/item.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ end
3333
---@param what string type of status
3434
---@param skip_gitignored boolean default false
3535
local function move(where, what, skip_gitignored)
36-
local node_cur = lib.get_node_at_cursor()
3736
local first_node_line = core.get_nodes_starting_line()
3837
local nodes_by_line = utils.get_nodes_by_line(core.get_explorer().nodes, first_node_line)
3938
local iter_start, iter_end, iter_step, cur, first, nex
@@ -57,7 +56,7 @@ local function move(where, what, skip_gitignored)
5756
first = line
5857
end
5958

60-
if node == node_cur then
59+
if cursor and line == cursor[1] then
6160
cur = line
6261
elseif valid and cur then
6362
nex = line

0 commit comments

Comments
 (0)