diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 15:37:18 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-21 15:37:18 +0800 |
commit | dcab266b70941e3347ae158bdcdabf184b096ee9 (patch) | |
tree | 639027420bd9db66f98d6022473ac40c2563a62c /server/src | |
parent | b96ced1cc366097052097e59468a925edfdfc57e (diff) | |
download | lua-language-server-dcab266b70941e3347ae158bdcdabf184b096ee9.zip |
必须匹配完整文件名
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/workspace.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/workspace.lua b/server/src/workspace.lua index 655dd873..ff26ff53 100644 --- a/server/src/workspace.lua +++ b/server/src/workspace.lua @@ -117,7 +117,10 @@ function mt:findPath(baseUri, searchers) for filename, uri in pairs(self.files) do for _, searcher in ipairs(searchers) do if filename:sub(-#searcher) == searcher then - results[#results+1] = uri + local sep = filename:sub(-#searcher-1, -#searcher-1) + if sep == '/' or sep == '\\' then + results[#results+1] = uri + end end end end |