summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-23 17:02:59 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-23 17:02:59 +0800
commitc73a5ccba1b39784b8b5ce8ce3f8694aee3e19da (patch)
tree11d215343ca0572b53331a97b6f01b9857bfed08 /script/files.lua
parent7253c49258c847601fe27d7e623d7d416556ba06 (diff)
downloadlua-language-server-c73a5ccba1b39784b8b5ce8ce3f8694aee3e19da.zip
update
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua8
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