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:
Guldoman
2021-10-26 00:12:16 +02:00
parent e68d6016f8
commit 9e721937af
+1 -1
View File
@@ -52,7 +52,7 @@ end
function Highlighter:insert_notify(line, n)
self:invalidate(line)
for i = 1, n do
table.insert(self.lines, line, nil)
table.insert(self.lines, line, false)
end
end