diff --git a/lua/nvim-tree.lua b/lua/nvim-tree.lua index 6106ff8c..7dd91cf7 100644 --- a/lua/nvim-tree.lua +++ b/lua/nvim-tree.lua @@ -196,7 +196,7 @@ end function M.place_cursor_on_node() local node = lib.get_node_at_cursor() - if not node then return end + if not node or node.name == ".." then return end local line = api.nvim_get_current_line() local cursor = api.nvim_win_get_cursor(0) local idx = vim.fn.stridx(line, node.name)