diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-01-02 09:53:10 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-01-02 09:53:10 +0800 |
commit | 64e049862427f3752863b678a243f5332a1a117f (patch) | |
tree | a3368a9dc9934cfb2458a345958b6d070001c927 /server | |
parent | df91fc4fe96436ea1ca7de5af214e5eade23762f (diff) | |
download | lua-language-server-64e049862427f3752863b678a243f5332a1a117f.zip |
修正大纲可能无法显示require变量的bug
Diffstat (limited to 'server')
-rw-r--r-- | server/src/core/document_symbol.lua | 2 | ||||
-rw-r--r-- | server/test/crossfile/document_symbol.lua | 2 |
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', |