diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-12-12 14:32:47 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-12-12 14:32:47 +0800 |
commit | 5b04bbf5d9b1b474acfaf447421374d3b107b04a (patch) | |
tree | a50a320bc4a7bcb9d35662220f9ddd614e5da6d5 /script-beta/core/rename.lua | |
parent | eb2e18588116f1c72c80cfa7c379bd98bc157640 (diff) | |
download | lua-language-server-5b04bbf5d9b1b474acfaf447421374d3b107b04a.zip |
value的ref包含自己
Diffstat (limited to 'script-beta/core/rename.lua')
-rw-r--r-- | script-beta/core/rename.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/script-beta/core/rename.lua b/script-beta/core/rename.lua index 3e4512da..d8a39ea2 100644 --- a/script-beta/core/rename.lua +++ b/script-beta/core/rename.lua @@ -322,9 +322,14 @@ function m.rename(uri, pos, newname) return nil end local results = {} + local mark = {} guide.eachSourceContain(ast.ast, pos, function(source) rename(source, newname, function (target, start, finish, text) + if mark[start] then + return + end + mark[start] = true results[#results+1] = { start = start, finish = finish, |