Fixed bug in Highlighter.invalidate() when setting first_invalid_line

The value should not be updated if the current first_invalid_line is less than
the new invalid line index
This commit is contained in:
rxi 2020-06-02 22:50:03 +01:00
parent f00d5d55df
commit 4b167e86c6

View file

@ -46,7 +46,7 @@ end
function Highlighter:invalidate(idx)
self.first_invalid_line = idx
self.first_invalid_line = math.min(self.first_invalid_line, idx)
self.max_wanted_line = math.min(self.max_wanted_line, #self.doc.lines)
end