summaryrefslogtreecommitdiff
path: root/script/core/command
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/command')
-rw-r--r--script/core/command/removeSpace.lua2
-rw-r--r--script/core/command/solve.lua6
2 files changed, 4 insertions, 4 deletions
diff --git a/script/core/command/removeSpace.lua b/script/core/command/removeSpace.lua
index e8b09932..29513951 100644
--- a/script/core/command/removeSpace.lua
+++ b/script/core/command/removeSpace.lua
@@ -32,7 +32,7 @@ return function (data)
goto NEXT_LINE
end
textEdit[#textEdit+1] = {
- range = define.range(lines, text, start, finish),
+ range = files.range(uri, start, finish),
newText = '',
}
goto NEXT_LINE
diff --git a/script/core/command/solve.lua b/script/core/command/solve.lua
index d3b8f94e..ff14bf40 100644
--- a/script/core/command/solve.lua
+++ b/script/core/command/solve.lua
@@ -35,8 +35,8 @@ return function (data)
return
end
- local start = define.offsetOfWord(lines, text, data.range.start)
- local finish = define.offsetOfWord(lines, text, data.range['end'])
+ local start = files.offsetOfWord(uri, data.range.start)
+ local finish = files.offsetOfWord(uri, data.range['end'])
local result = guide.eachSourceContain(ast.ast, start, function (source)
if source.start ~= start
@@ -86,7 +86,7 @@ return function (data)
changes = {
[uri] = {
{
- range = define.range(lines, text, result.start, result.finish),
+ range = files.range(uri, result.start, result.finish),
newText = ('(%s)'):format(text:sub(result.start, result.finish)),
}
},