From a9af0a5e9126d06c70454985b469ecdb3440dede Mon Sep 17 00:00:00 2001 From: "simon.mandlik" Date: Tue, 11 Nov 2025 15:33:43 +0100 Subject: [PATCH] feat: use dirname as well to determine width to grow to --- lua/nvim-tree/view.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/nvim-tree/view.lua b/lua/nvim-tree/view.lua index 90f2b033f3e..f738b0b2ca1 100644 --- a/lua/nvim-tree/view.lua +++ b/lua/nvim-tree/view.lua @@ -303,8 +303,7 @@ function M.open(options) end local function grow() - local starts_at = M.is_root_folder_visible(require("nvim-tree.core").get_cwd()) and 1 or 0 - local lines = vim.api.nvim_buf_get_lines(M.get_bufnr(), starts_at, -1, false) + local lines = vim.api.nvim_buf_get_lines(M.get_bufnr(), 0, -1, false) -- number of columns of right-padding to indicate end of path local padding = get_size(M.View.padding)