From 645206e87f64de37180800466fdacee7228c9913 Mon Sep 17 00:00:00 2001 From: Tristan Kapous <10952525+tkapous@users.noreply.github.com> Date: Thu, 9 Oct 2025 04:49:21 +0200 Subject: [PATCH] fix(undotree): error on `undotree.open()` with title as string #36085 --- runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua b/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua index 14875fa464..72734cbf2c 100644 --- 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')