summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-04 09:57:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-04 09:57:21 +0800
commit50a1df60f0916ff2a1cd68a37d501851b10d1da3 (patch)
tree9d4b54f26e1b24e2407de958cf13c39e75471b65
parent5852b8d8865800b128d8dea5af453b2a975a9807 (diff)
downloadlua-language-server-50a1df60f0916ff2a1cd68a37d501851b10d1da3.zip
fix #339
-rw-r--r--changelog.md1
-rw-r--r--script/core/rename.lua2
2 files changed, 2 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index 885ab0c3..99ba013d 100644
--- a/changelog.md
+++ b/changelog.md
@@ -2,6 +2,7 @@
## 1.9.1
* `CHG` supports `~` in command line
+* `FIX` [#339](https://github.com/sumneko/lua-language-server/issues/339)
## 1.9.0
`2020-12-31`
diff --git a/script/core/rename.lua b/script/core/rename.lua
index b823cb86..3f73c338 100644
--- a/script/core/rename.lua
+++ b/script/core/rename.lua
@@ -292,7 +292,7 @@ local function ofField(source, newname, callback)
else
node = source.node
end
- for _, src in ipairs(vm.getFields(node, 0)) do
+ for _, src in ipairs(vm.getFields(node, 5)) do
ofFieldThen(key, src, newname, callback)
end
end