fix(undotree): error on undotree.open() with title as string #36085

This commit is contained in:
Tristan Kapous
2025-10-09 04:49:21 +02:00
committed by GitHub
parent 81d2d88f70
commit 645206e87f

View File

@@ -348,6 +348,8 @@ function M.open(opts)
title = string.format('Undo tree for %s', vim.fn.fnamemodify(bufname, ':.')) title = string.format('Undo tree for %s', vim.fn.fnamemodify(bufname, ':.'))
elseif type(opts_title) == 'function' then elseif type(opts_title) == 'function' then
title = opts_title(buf) title = opts_title(buf)
elseif type(opts_title) == 'string' then
title = opts_title
end end
assert(type(title) == 'string', 'Window title must be a string') assert(type(title) == 'string', 'Window title must be a string')