diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-23 15:00:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-23 15:00:50 +0800 |
commit | 5c9b1b467af1636ea21a9bd3d398e220790eea54 (patch) | |
tree | 8a834bcb5e9c8e6c32f118c23fbeafcaf01630ab /script/core/command | |
parent | 0a60aa17c240d4fb080b091891f659a9d74aeffd (diff) | |
download | lua-language-server-5c9b1b467af1636ea21a9bd3d398e220790eea54.zip |
cleanup
Diffstat (limited to 'script/core/command')
-rw-r--r-- | script/core/command/solve.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/script/core/command/solve.lua b/script/core/command/solve.lua index a493de24..790adbee 100644 --- a/script/core/command/solve.lua +++ b/script/core/command/solve.lua @@ -1,7 +1,8 @@ -local files = require 'files' -local guide = require 'parser.guide' -local proto = require 'proto' -local lang = require 'language' +local files = require 'files' +local guide = require 'parser.guide' +local proto = require 'proto' +local lang = require 'language' +local converter = require 'proto.converter' local opMap = { ['+'] = true, @@ -34,8 +35,7 @@ return function (data) return end - local start = files.offsetOfWord(uri, data.range.start) - local finish = files.offsetOfWord(uri, data.range['end']) + local start, finish = converter.unpackRange(uri, data.range) local result = guide.eachSourceContain(ast.ast, start, function (source) if source.start ~= start |