diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-06 09:54:45 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-06 09:54:45 +0800 |
commit | c84d61d473c514f4fe5483f38a8d159ffe8689cd (patch) | |
tree | 74efbecc9c8cb1cba9d279eeef6df0411cef8fff /server/src/matcher/rename.lua | |
parent | 87a7ea0746191bec7f24315cef85c79be37d0bf8 (diff) | |
download | lua-language-server-c84d61d473c514f4fe5483f38a8d159ffe8689cd.zip |
还是要判的
Diffstat (limited to 'server/src/matcher/rename.lua')
-rw-r--r-- | server/src/matcher/rename.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/matcher/rename.lua b/server/src/matcher/rename.lua index 3b697309..51613a72 100644 --- a/server/src/matcher/rename.lua +++ b/server/src/matcher/rename.lua @@ -47,7 +47,9 @@ local function parseResult(result, newName) local metavar = tryMeta(var) if metavar then for _, info in ipairs(metavar) do - positions[#positions+1] = {info.source.start, info.source.finish} + if info.source[1] == key then + positions[#positions+1] = {info.source.start, info.source.finish} + end end end elseif tp == 'label' then |