diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/core/highlight.lua | 2 | ||||
-rw-r--r-- | script/core/rename.lua | 10 |
2 files changed, 2 insertions, 10 deletions
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) 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) |