From 4598305e0b651608fde9056488b6673e82819f13 Mon Sep 17 00:00:00 2001 From: Mike J McGuirk <62523234+mikejmcguirk@users.noreply.github.com> Date: Thu, 9 Oct 2025 10:49:49 -0400 Subject: [PATCH] fix(undotree): mark title field annotation as optional (#36102) * fix(undotree): mark title field annotation as optional * fix(doc): run make doc for undotree annotation change --- runtime/doc/plugins.txt | 6 +++--- runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/runtime/doc/plugins.txt b/runtime/doc/plugins.txt index ad10a6d461..1fd46e9725 100644 --- a/runtime/doc/plugins.txt +++ b/runtime/doc/plugins.txt @@ -181,9 +181,9 @@ open({opts}) *undotree.open()* • {command} (`string?`) Vimscript command to create the window. Default value is "30vnew". Only used when {winid} is nil. - • {title} (`string|fun(bufnr:integer):string?`) Title of the - window. If a function, it accepts the buffer number of the - source buffer as its only argument and should return a + • {title} (`(string|fun(bufnr:integer):string?)?`) Title of + the window. If a function, it accepts the buffer number of + the source buffer as its only argument and should return a string. diff --git a/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua b/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua index 72734cbf2c..08219879f9 100644 --- a/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua +++ b/runtime/pack/dist/opt/nvim.undotree/lua/undotree.lua @@ -287,7 +287,7 @@ end --- --- Title of the window. If a function, it accepts the buffer number of the --- source buffer as its only argument and should return a string. ---- @field title (string|fun(bufnr:integer):string|nil) +--- @field title (string|fun(bufnr:integer):string|nil)? --- Open a window that displays a textual representation of the undotree. ---