We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 630305c commit 1e3c578Copy full SHA for 1e3c578
lua/nvim-tree/view.lua
@@ -211,8 +211,9 @@ local function grow()
211
local lines = vim.api.nvim_buf_get_lines(M.get_bufnr(), starts_at, -1, false)
212
local max_length = M.View.initial_width
213
for _, l in pairs(lines) do
214
- if max_length < #l then
215
- max_length = #l
+ local count = vim.fn.strchars(l) + 3 -- plus some padding
+ if max_length < count then
216
+ max_length = count
217
end
218
219
M.resize(max_length)
0 commit comments