diff options
-rw-r--r-- | runtime/doc/lua.txt | 8 | ||||
-rw-r--r-- | runtime/lua/vim/_meta/builtin.lua | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index d6d0f1a9f8..6a839b205c 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -893,10 +893,10 @@ Log levels are one of the values defined in `vim.log.levels`: vim.log.levels.OFF vim.empty_dict() *vim.empty_dict()* - Creates a special empty table (marked with a metatable), which Nvim to an - empty dictionary when translating Lua values to Vimscript or API types. - Nvim by default converts an empty table `{}` without this metatable to an - list/array. + Creates a special empty table (marked with a metatable), which Nvim + converts to an empty dictionary when translating Lua values to Vimscript + or API types. Nvim by default converts an empty table `{}` without this + metatable to an list/array. Note: If numeric keys are present in the table, Nvim ignores the metatable marker and converts the dict to a list/array anyway. diff --git a/runtime/lua/vim/_meta/builtin.lua b/runtime/lua/vim/_meta/builtin.lua index 980e40d61b..88f07f2a51 100644 --- a/runtime/lua/vim/_meta/builtin.lua +++ b/runtime/lua/vim/_meta/builtin.lua @@ -69,10 +69,10 @@ --- to other restrictions such as |textlock|). function vim.in_fast_event() end ---- Creates a special empty table (marked with a metatable), which Nvim to an ---- empty dictionary when translating Lua values to Vimscript or API types. ---- Nvim by default converts an empty table `{}` without this metatable to an ---- list/array. +--- Creates a special empty table (marked with a metatable), which Nvim +--- converts to an empty dictionary when translating Lua values to Vimscript +--- or API types. Nvim by default converts an empty table `{}` without this +--- metatable to an list/array. --- --- Note: If numeric keys are present in the table, Nvim ignores the metatable --- marker and converts the dict to a list/array anyway. |