summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-16 17:46:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-16 17:46:57 +0800
commitd871a27c0ddfa01b11e0dc2ef0270699217af14a (patch)
treed6743063546e263f78a5598d18b4be2b8ebd1697
parente6c20fa2bdf59293488734a8f8bf17efcc234363 (diff)
downloadlua-language-server-d871a27c0ddfa01b11e0dc2ef0270699217af14a.zip
fix
-rw-r--r--script/files.lua7
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)