summaryrefslogtreecommitdiff
path: root/server/src/matcher/rename.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-06 09:54:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-06 09:54:45 +0800
commitc84d61d473c514f4fe5483f38a8d159ffe8689cd (patch)
tree74efbecc9c8cb1cba9d279eeef6df0411cef8fff /server/src/matcher/rename.lua
parent87a7ea0746191bec7f24315cef85c79be37d0bf8 (diff)
downloadlua-language-server-c84d61d473c514f4fe5483f38a8d159ffe8689cd.zip
还是要判的
Diffstat (limited to 'server/src/matcher/rename.lua')
-rw-r--r--server/src/matcher/rename.lua4
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