From 2d37173ea1b669867d89faae61e6e3bb63d72692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 4 Jan 2022 14:21:22 +0800 Subject: fix #886 --- script/core/rename.lua | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'script') diff --git a/script/core/rename.lua b/script/core/rename.lua index 0c48dbc4..d90a49bb 100644 --- a/script/core/rename.lua +++ b/script/core/rename.lua @@ -183,14 +183,7 @@ end local function ofField(source, newname, callback) local key = guide.getKeyName(source) - local node - if source.type == 'tablefield' - or source.type == 'tableindex' then - node = source.parent - else - node = source.node - end - for _, src in ipairs(vm.getAllRefs(node, '*')) do + for _, src in ipairs(vm.getAllRefs(source)) do ofFieldThen(key, src, newname, callback) end end @@ -276,7 +269,6 @@ local function rename(source, newname, callback) return ofField(parent, newname, callback) end end - return end local function prepareRename(source) -- cgit v1.2.3 From db575065af7c0fab76f6d3d7964ae84244757c91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 4 Jan 2022 16:07:26 +0800 Subject: fix #885 --- script/core/highlight.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script') diff --git a/script/core/highlight.lua b/script/core/highlight.lua index 02f3c07f..bbfd1504 100644 --- a/script/core/highlight.lua +++ b/script/core/highlight.lua @@ -348,7 +348,7 @@ return function (uri, offset) results[#results+1] = { start = start, finish = finish, - kind = define.DocumentHighlightKind.Write + kind = define.DocumentHighlightKind.Text } end) -- cgit v1.2.3