diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-12 13:21:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-12 13:21:05 +0800 |
commit | 3e71bf6a712cc008e95caa2a3c38aa41b700d95d (patch) | |
tree | b130b9585b669f6c4a6692fda03aa98ad2b45f0f /server/src/core/document_symbol.lua | |
parent | 882c3cf491e9449cbfb0d24f3f556fde313fb7ea (diff) | |
download | lua-language-server-3e71bf6a712cc008e95caa2a3c38aa41b700d95d.zip |
优先使用自己的名字
Diffstat (limited to 'server/src/core/document_symbol.lua')
-rw-r--r-- | server/src/core/document_symbol.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/core/document_symbol.lua b/server/src/core/document_symbol.lua index 404afed7..af77cc93 100644 --- a/server/src/core/document_symbol.lua +++ b/server/src/core/document_symbol.lua @@ -72,7 +72,7 @@ local function buildLocal(vm, source, callback) valueSource = source end local name = hvr.name - if vm.uri ~= value.uri then + if vm.uri ~= value.uri and name == '' then name = tostring(source[1] or '') end -- 由于范围不允许交叉,为了支持 local x, y, z = 1, 2, 3 的形式 @@ -126,7 +126,7 @@ local function buildSet(vm, source, callback) valueSource = source end local name = hvr.name - if vm.uri ~= value.uri then + if vm.uri ~= value.uri and name == '' then name = tostring(source[1] or '') end -- 由于范围不允许交叉,为了支持 x, y, z = 1, 2, 3 的形式 |