Fix overly strict backward_sorted_until

A change that ended exactly where the previous one started was not
considered backward sorted. Leading to some very bad performances in
certain cases, like '100000o<esc>u'
This commit is contained in:
Maxime Coste 2017-02-20 19:46:12 +00:00
parent fe2d0fab71
commit e2f6b9a393

View File

@ -86,7 +86,7 @@ const Buffer::Change* backward_sorted_until(const Buffer::Change* first, const B
if (first != last) { if (first != last) {
const Buffer::Change* next = first; const Buffer::Change* next = first;
while (++next != last) { while (++next != last) {
if (first->begin <= next->end) if (first->begin < next->end)
return next; return next;
first = next; first = next;
} }