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 eda85c97..e7b19bd3 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -803,6 +803,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)