diff options
-rw-r--r-- | changelog.md | 1 | ||||
-rw-r--r-- | script/workspace/workspace.lua | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index a95923e8..55564c01 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ * `FIX` loaded new file with ignored filename * `FIX` [#536](https://github.com/sumneko/lua-language-server/issues/536) * `FIX` [#537](https://github.com/sumneko/lua-language-server/issues/537) +* `FIX` [#538](https://github.com/sumneko/lua-language-server/issues/538) * `FIX` [#539](https://github.com/sumneko/lua-language-server/issues/539) ## 1.21.1 diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua index fd0978b3..72a689c1 100644 --- a/script/workspace/workspace.lua +++ b/script/workspace/workspace.lua @@ -349,11 +349,11 @@ function m.findUrisByFilePath(path) if platform.OS ~= 'Windows' then uri = files.getOriginUri(uri) end - if not uri:find(lpath, 1, true) then + local curPath = furi.decode(files.getOriginUri(uri)) + if not curPath:find(lpath, 1, true) then goto CONTINUE end local pathLen = #path - local curPath = furi.decode(files.getOriginUri(uri)) local curLen = #curPath local seg = curPath:sub(curLen - pathLen, curLen - pathLen) if seg == '/' or seg == '\\' or seg == '' then |