aboutsummaryrefslogtreecommitdiff
path: root/scripts/gen_vimdoc.py
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-12-19 18:17:43 -0800
committerJustin M. Keyes <justinkz@gmail.com>2019-12-21 20:36:00 -0800
commit4657819e80e3493564c0dd7cf16864aa9bf73c69 (patch)
treee6dffcc28fd67d63d49a1f2faeb1194fb65d1679 /scripts/gen_vimdoc.py
parentf968dad3bff5dd4e0d8d797b561fcb2c76553a1c (diff)
downloadrneovim-4657819e80e3493564c0dd7cf16864aa9bf73c69.tar.gz
rneovim-4657819e80e3493564c0dd7cf16864aa9bf73c69.tar.bz2
rneovim-4657819e80e3493564c0dd7cf16864aa9bf73c69.zip
gen_vimdoc.py: mpack: collect functions in 1 dict
All Nvim API, core Vimscript, and core Lua functions are globally unique, so there is no need for per-module nested dicts. BEFORE (generated mpack structure): [ { "buffer.c": { "nvim__buf_stats": { ... }, ... }, "window.c": { "nvim_win_close": { ... }, ... }, ... } ] AFTER (generated mpack structure): [ { "nvim__buf_stats": { ... }, "nvim_buf_attach": { ... }, "nvim_tabpage_set_var": { ... }, "nvim_ui_attach": { ... }, "nvim_win_close": { ... } } ]
Diffstat (limited to 'scripts/gen_vimdoc.py')
-rwxr-xr-xscripts/gen_vimdoc.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/gen_vimdoc.py b/scripts/gen_vimdoc.py
index 676e6b5be9..229a68a462 100755
--- a/scripts/gen_vimdoc.py
+++ b/scripts/gen_vimdoc.py
@@ -729,7 +729,7 @@ def gen_docs(config):
if p.returncode:
sys.exit(p.returncode)
- fn_maps = {}
+ fn_map_full = {} # Collects all functions as each module is processed.
sections = {}
intros = {}
sep = '=' * text_width
@@ -800,7 +800,7 @@ def gen_docs(config):
title = '{} Functions'.format(name)
helptag = '*api-{}*'.format(name.lower())
sections[filename] = (title, helptag, doc)
- fn_maps[filename] = fn_map
+ fn_map_full.update(fn_map)
if not sections:
return
@@ -833,7 +833,7 @@ def gen_docs(config):
fp.write(docs.encode('utf8'))
with open(mpack_file, 'wb') as fp:
- fp.write(msgpack.packb(fn_maps, use_bin_type=True))
+ fp.write(msgpack.packb(fn_map_full, use_bin_type=True))
shutil.rmtree(output_dir)