diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-07-16 09:57:43 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-07-16 09:57:43 +0800 |
commit | 15bb0851772bc2b82585f499ab61a9dc0c0feb8a (patch) | |
tree | 64fc3129c3746cf37b7c6bf8f1d3da1117a82d65 /server/src | |
parent | e90b4d2aa2aa02ac55ca67a1be122267531ee658 (diff) | |
download | lua-language-server-15bb0851772bc2b82585f499ab61a9dc0c0feb8a.zip |
修正以非工作区的形式打开lua文件后语言服务失效的bug
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/service.lua | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/service.lua b/server/src/service.lua index 9242a61d..a6ca2705 100644 --- a/server/src/service.lua +++ b/server/src/service.lua @@ -728,11 +728,12 @@ function mt:restartDueToMemoryLeak() end function mt:reScanFiles() + if not self.workspace then + return + end log.debug('reScanFiles') self:clearAllFiles() - if self.workspace then - self.workspace:scanFiles() - end + self.workspace:scanFiles() end function mt:onUpdateConfig(updated, other) |