diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-16 22:57:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-16 22:57:59 +0800 |
commit | d31ecd5f2b8793667b3e8dad576737440c47a29d (patch) | |
tree | 4a81018e82564fb036685b995f25e185d90de352 /script/files.lua | |
parent | e8fb2d2e0af8776662e010d334eb46ca1ccd7729 (diff) | |
download | lua-language-server-d31ecd5f2b8793667b3e8dad576737440c47a29d.zip |
cleanup
Diffstat (limited to 'script/files.lua')
-rw-r--r-- | script/files.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/script/files.lua b/script/files.lua index 05b7ab23..768a7434 100644 --- a/script/files.lua +++ b/script/files.lua @@ -550,38 +550,6 @@ function m.getLastState(uri) return file.ast end ----设置文件的当前可见范围 ----@param uri uri ----@param ranges range[] -function m.setVisibles(uri, ranges) - m.visible[uri] = ranges - m.onWatch('updateVisible', uri) -end - ----获取文件的当前可见范围 ----@param uri uri ----@return table[] -function m.getVisibles(uri) - local file = m.fileMap[uri] - if not file then - return nil - end - local ranges = m.visible[uri] - if not ranges or #ranges == 0 then - return nil - end - local visibles = {} - for i, range in ipairs(ranges) do - local startRow = range.start.line - local finishRow = range['end'].line - visibles[i] = { - start = guide.positionOf(startRow, 0), - finish = guide.positionOf(finishRow, 0), - } - end - return visibles -end - function m.getFile(uri) return m.fileMap[uri] or m.dllMap[uri] |