diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-23 17:02:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-23 17:02:59 +0800 |
commit | c73a5ccba1b39784b8b5ce8ce3f8694aee3e19da (patch) | |
tree | 11d215343ca0572b53331a97b6f01b9857bfed08 /script/files.lua | |
parent | 7253c49258c847601fe27d7e623d7d416556ba06 (diff) | |
download | lua-language-server-c73a5ccba1b39784b8b5ce8ce3f8694aee3e19da.zip |
update
Diffstat (limited to 'script/files.lua')
-rw-r--r-- | script/files.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script/files.lua b/script/files.lua index e7999533..0c2c2874 100644 --- a/script/files.lua +++ b/script/files.lua @@ -518,11 +518,11 @@ function m.getVisibles(uri) end local visibles = {} for i, range in ipairs(ranges) do - -- TODO 改成行号 - local start, finish = m.unrange(uri, range) + local startRow = guide.rowColOf(range.start) + local finishRow = guide.rowColOf(range['end']) visibles[i] = { - start = start, - finish = finish, + start = guide.positionOf(startRow, 0), + finish = guide.positionOf(finishRow, 0), } end return visibles |