From ffb4b50e74657b3b15199972371e0cff84f9cd4a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 15 May 2024 19:39:35 +0800 Subject: docs(lua): restore missing indexing for vim.bo and vim.wo (#28751) --- scripts/gen_vimdoc.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/gen_vimdoc.lua') diff --git a/scripts/gen_vimdoc.lua b/scripts/gen_vimdoc.lua index 085b1f5bea..6d0fc46145 100755 --- a/scripts/gen_vimdoc.lua +++ b/scripts/gen_vimdoc.lua @@ -614,6 +614,12 @@ local function render_fun_header(fun, cfg) if fun.classvar then nm = fmt('%s:%s', fun.classvar, nm) end + if nm == 'vim.bo' then + nm = 'vim.bo[{bufnr}]' + end + if nm == 'vim.wo' then + nm = 'vim.wo[{winid}][{bufnr}]' + end local proto = fun.table and nm or nm .. '(' .. table.concat(args, ', ') .. ')' -- cgit