commit 645206e87f64de37180800466fdacee7228c9913
parent 81d2d88f70e054b92a58e1a4125f34a01fcb789e
Author: Tristan Kapous <10952525+tkapous@users.noreply.github.com>
Date: Thu, 9 Oct 2025 04:49:21 +0200
fix(undotree): error on `undotree.open()` with title as string #36085
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua b/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua
@@ -348,6 +348,8 @@ function M.open(opts)
title = string.format('Undo tree for %s', vim.fn.fnamemodify(bufname, ':.'))
elseif type(opts_title) == 'function' then
title = opts_title(buf)
+ elseif type(opts_title) == 'string' then
+ title = opts_title
end
assert(type(title) == 'string', 'Window title must be a string')