diff options
Diffstat (limited to 'runtime/lua/vim')
-rw-r--r-- | runtime/lua/vim/_editor.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/_editor.lua b/runtime/lua/vim/_editor.lua index c4cc151bca..442d7b07d8 100644 --- a/runtime/lua/vim/_editor.lua +++ b/runtime/lua/vim/_editor.lua @@ -614,7 +614,7 @@ function vim._expand_pat(pat, env) local function insert_keys(obj) for k, _ in pairs(obj) do if type(k) == 'string' and string.sub(k, 1, string.len(match_part)) == match_part then - table.insert(keys, k) + keys[k] = true end end end @@ -630,6 +630,7 @@ function vim._expand_pat(pat, env) insert_keys(vim._submodules) end + keys = vim.tbl_keys(keys) table.sort(keys) return keys, #prefix_match_pat |