diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 14:12:34 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-24 14:12:34 +0800 |
commit | 9cd1e6a36c4ba71da2e46abfe9ddd674a959b6cd (patch) | |
tree | 54a569b3618be65e3d48b0d7e640bca481cf8a09 /server | |
parent | 3f9ca58f22eeccd30ff1093c9874bfa79d40a29f (diff) | |
download | lua-language-server-9cd1e6a36c4ba71da2e46abfe9ddd674a959b6cd.zip |
跨文件的新建对象也能跳转了
Diffstat (limited to 'server')
-rw-r--r-- | server/src/matcher/vm.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/matcher/vm.lua b/server/src/matcher/vm.lua index 74a86d59..63bc826e 100644 --- a/server/src/matcher/vm.lua +++ b/server/src/matcher/vm.lua @@ -508,6 +508,9 @@ function mt:tryRequireOne(strValue, mode) elseif mode == 'dofile' then uri = self.lsp.workspace:loadPath(self.uri, str) end + if not uri then + return nil + end -- 如果取不到VM(不编译),则做个标记,之后再取一次 local destVM = self.lsp:getVM(uri) if destVM then |