diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-19 11:49:09 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-19 11:49:09 +0800 |
commit | 1458139721646236406825a03a21152d98753515 (patch) | |
tree | 99d931e0c103e5047d1a0eb8b502aa1670a04979 /script/proto | |
parent | c7a0b295570e78a43f0819d9e0ba9a4c076b7e1a (diff) | |
download | lua-language-server-1458139721646236406825a03a21152d98753515.zip |
supports incremental text sync
Diffstat (limited to 'script/proto')
-rw-r--r-- | script/proto/define.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/script/proto/define.lua b/script/proto/define.lua index f6f8e9cc..920571af 100644 --- a/script/proto/define.lua +++ b/script/proto/define.lua @@ -89,6 +89,11 @@ function m.range(lines, text, offset1, offset2) end --- convert `range` to `offsetStart` and `offsetFinish` +---@param lines table +---@param text string +---@param range table +---@return integer start +---@return integer finish function m.unrange(lines, text, range) local start = m.offset(lines, text, range.start) local finish = m.offset(lines, text, range['end']) |