summaryrefslogtreecommitdiff
path: root/script/parser/guide.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-23 02:57:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-23 02:57:13 +0800
commit838ce36fdd7abdff0b4cab5e67c2500325178805 (patch)
treebffd74f604cbcf666ca5d41d1c9f5750e48e1db9 /script/parser/guide.lua
parent0ff98557a45c25d7a49520e57f49561a62300f35 (diff)
downloadlua-language-server-838ce36fdd7abdff0b4cab5e67c2500325178805.zip
update
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r--script/parser/guide.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 7a9cb875..969eb386 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -825,6 +825,8 @@ function m.positionToOffset(state, position)
return m.positionToOffsetByLines(state.lines, position)
end
+---@param lines integer[]
+---@param offset integer
function m.offsetToPositionByLines(lines, offset)
local left = 0
local right = #lines