summaryrefslogtreecommitdiff
path: root/server-beta/src/parser
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/parser')
-rw-r--r--server-beta/src/parser/guide.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/server-beta/src/parser/guide.lua b/server-beta/src/parser/guide.lua
index b8593865..1cc82143 100644
--- a/server-beta/src/parser/guide.lua
+++ b/server-beta/src/parser/guide.lua
@@ -361,7 +361,7 @@ end
---@return integer {name = 'col'}
function m.positionOf(lines, offset)
if offset < 1 then
- return 1, 1
+ return 0, 0
end
local lastLine = lines[#lines]
if offset > lastLine.finish then
@@ -394,7 +394,7 @@ end
---@return integer {name = 'offset'}
function m.offsetOf(lines, row, col)
if row < 1 then
- return 1
+ return 0
end
if row > #lines then
local lastLine = lines[#lines]
@@ -422,7 +422,7 @@ end
function m.lineRange(lines, row)
local line = lines[row]
if not line then
- return 1, 1
+ return 0, 0
end
return line.start, line.finish
end