From 0bc8258529e620b3c9d38bf5e88158ea24c85350 Mon Sep 17 00:00:00 2001 From: Pavel <38500943+BrotifyPacha@users.noreply.github.com> Date: Mon, 31 Jan 2022 11:17:40 +0300 Subject: [PATCH] fix: parent_node offset when hide_root_folder is true (#912) --- lua/nvim-tree/lib.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/nvim-tree/lib.lua b/lua/nvim-tree/lib.lua index a71d8201..143488ac 100644 --- a/lua/nvim-tree/lib.lua +++ b/lua/nvim-tree/lib.lua @@ -370,6 +370,7 @@ function M.parent_node(node, should_close) parent.open = false altered_tree = true end + line = require'nvim-tree.view'.View.hide_root_folder and line - 1 or line view.set_cursor({line, 0}) end