diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 14:56:28 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-22 14:56:28 +0800 |
commit | ce28b76cfc597e0cef3a62d8f7e181cf7ff4c904 (patch) | |
tree | facd441241b6febbf02face32be517dee275c90e /server/src | |
parent | 04ff98eed8c5545f80dacb636876606e90bb57af (diff) | |
download | lua-language-server-ce28b76cfc597e0cef3a62d8f7e181cf7ff4c904.zip |
修正文档符号有时生成失败的问题
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/core/document_symbol.lua | 9 |
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) |