summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/core/document_symbol.lua2
-rw-r--r--server/test/crossfile/document_symbol.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua
index 13ee56e9..b06953d9 100644
--- a/server/src/core/document_symbol.lua
+++ b/server/src/core/document_symbol.lua
@@ -93,7 +93,7 @@ local function buildVar(vm, var)
if var.source.start == 0 then
return nil
end
- if var.value and var.value.type == 'function' then
+ if var.value and var.value.type == 'function' and var.value.uri == vm.uri then
return nil
end
if var.hide then
diff --git a/server/test/crossfile/document_symbol.lua b/server/test/crossfile/document_symbol.lua
index 32d8364b..7852c645 100644
--- a/server/test/crossfile/document_symbol.lua
+++ b/server/test/crossfile/document_symbol.lua
@@ -86,7 +86,7 @@ end
TEST {
{
path = 'a.lua',
- content = '',
+ content = 'return function () end',
},
{
path = 'b.lua',