summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-22 14:56:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-22 14:56:28 +0800
commitce28b76cfc597e0cef3a62d8f7e181cf7ff4c904 (patch)
treefacd441241b6febbf02face32be517dee275c90e /server/src
parent04ff98eed8c5545f80dacb636876606e90bb57af (diff)
downloadlua-language-server-ce28b76cfc597e0cef3a62d8f7e181cf7ff4c904.zip
修正文档符号有时生成失败的问题
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/document_symbol.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index b06953d9..6044c697 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -83,10 +83,13 @@ local function isLocalTable(var)
if var.value.source.start == 0 then
return false
end
- if var.source == var.value.declarat then
- return true
+ if var.source ~= var.value.declarat then
+ return false
+ end
+ if var.value.source.finish < var.source.finish then
+ return false
end
- return false
+ return true
end
local function buildVar(vm, var)