summaryrefslogtreecommitdiff
path: root/script/proto/define.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/proto/define.lua')
-rw-r--r--script/proto/define.lua5
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'])