diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-16 17:46:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-16 17:46:57 +0800 |
commit | d871a27c0ddfa01b11e0dc2ef0270699217af14a (patch) | |
tree | d6743063546e263f78a5598d18b4be2b8ebd1697 | |
parent | e6c20fa2bdf59293488734a8f8bf17efcc234363 (diff) | |
download | lua-language-server-d871a27c0ddfa01b11e0dc2ef0270699217af14a.zip |
fix
-rw-r--r-- | script/files.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/script/files.lua b/script/files.lua index eb9fe97c..f5f2f1c5 100644 --- a/script/files.lua +++ b/script/files.lua @@ -210,9 +210,12 @@ function m.removeAllClosed() end --- 遍历文件 ---- TODO: 协程不安全 function m.eachFile() - return pairs(m.fileMap) + local map = {} + for uri, file in pairs(m.fileMap) do + map[uri] = file + end + return pairs(map) end function m.compileAst(uri, text) |