mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 13:56:05 +00:00
fix(undotree): error on undotree.open()
with title as string #36085
This commit is contained in:
@@ -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')
|
||||||
|
Reference in New Issue
Block a user