Don't insert `nil` in highlighter lines table
When `highlighter:insert_notify` was called, a hole in the array was created. If another call to `highlighter:insert_notify` happened before the hole was filled, a `Position out of bounds` error could have been raised.
This commit is contained in:
parent
e68d6016f8
commit
9e721937af
|
@ -52,7 +52,7 @@ end
|
||||||
function Highlighter:insert_notify(line, n)
|
function Highlighter:insert_notify(line, n)
|
||||||
self:invalidate(line)
|
self:invalidate(line)
|
||||||
for i = 1, n do
|
for i = 1, n do
|
||||||
table.insert(self.lines, line, nil)
|
table.insert(self.lines, line, false)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue