summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/guide.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 92e4edab..2de1ac22 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -800,6 +800,9 @@ function m.offsetToPosition(state, offset)
end
function m.getLineRange(state, row)
+ if not state.lines[row] then
+ return 0
+ end
local nextLineStart = state.lines[row + 1] or #state.lua
for i = nextLineStart - 1, state.lines[row], -1 do
local w = state.lua:sub(i, i)