summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
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)