summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-31 02:18:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-31 02:18:57 +0800
commitdd65efc5c201d8111051991525b890a6ba3a5e46 (patch)
treeab95d62a3fbd08c879b8f711b8dade65736ea735 /script/files.lua
parent7b3aafb37ba7db4f32a010d2c8914690aedf457d (diff)
downloadlua-language-server-dd65efc5c201d8111051991525b890a6ba3a5e46.zip
files.eachFile check exists inside
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/script/files.lua b/script/files.lua
index 88b1fe32..0817887f 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -280,6 +280,14 @@ function m.eachFile()
local i = 0
return function ()
i = i + 1
+ local uri = files[i]
+ while not m.fileMap[uri] do
+ i = i + 1
+ uri = files[i]
+ if not uri then
+ return nil
+ end
+ end
return files[i]
end
end