summaryrefslogtreecommitdiff
path: root/server/src/core/signature.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-21 15:41:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-21 15:41:59 +0800
commita67da00e8e2b61a2fa197188b7ffb3e3b83a2a74 (patch)
tree749c08fa9ad3e5131c24592c72db121e1bb9d601 /server/src/core/signature.lua
parentb80dc1e6acaf9df1c2f53ca83f0ed9cbf8e1fa71 (diff)
downloadlua-language-server-a67da00e8e2b61a2fa197188b7ffb3e3b83a2a74.zip
更加准确的分词
Diffstat (limited to 'server/src/core/signature.lua')
-rw-r--r--server/src/core/signature.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/core/signature.lua b/server/src/core/signature.lua
index 3e551e38..1e629308 100644
--- a/server/src/core/signature.lua
+++ b/server/src/core/signature.lua
@@ -68,8 +68,8 @@ local function getHover(call, pos)
end
return function (vm, pos)
- local source = findSource(vm, pos)
- if source.type == 'string' then
+ local source = findSource(vm, pos) or findSource(vm, pos-1)
+ if not source or source.type == 'string' then
return
end
local calls = findCall(vm, pos)