summaryrefslogtreecommitdiff
path: root/server/src/core/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-13 18:03:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-13 18:03:24 +0800
commit2614c2f6e6a53e4142fe57a184fd7bead11a5f4f (patch)
tree17bd6669b19ac260bed90a9dfea241e4117074ff /server/src/core/hover
parent628a272b7babbeab995cf582ff4337b897ac09e6 (diff)
downloadlua-language-server-2614c2f6e6a53e4142fe57a184fd7bead11a5f4f.zip
解除所有的source循环引用
Diffstat (limited to 'server/src/core/hover')
-rw-r--r--server/src/core/hover/function.lua2
-rw-r--r--server/src/core/hover/name.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/server/src/core/hover/function.lua b/server/src/core/hover/function.lua
index 9bb532ae..aa6816b5 100644
--- a/server/src/core/hover/function.lua
+++ b/server/src/core/hover/function.lua
@@ -20,7 +20,7 @@ local function buildValueArgs(func, object, select)
start = 2
end
local max
- if func.source then
+ if func:getSource() then
max = #names
else
max = math.max(#names, #values)
diff --git a/server/src/core/hover/name.lua b/server/src/core/hover/name.lua
index b363f653..52bcfef4 100644
--- a/server/src/core/hover/name.lua
+++ b/server/src/core/hover/name.lua
@@ -5,8 +5,8 @@ return function (source)
end
local func = value:getFunction()
local declarat
- if func and func.source then
- declarat = func.source.name
+ if func and func:getSource() then
+ declarat = func:getSource().name
else
declarat = source
end