From e2f6b9a393f4ad0832ce4508a307851a2af84808 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Mon, 20 Feb 2017 19:46:12 +0000 Subject: [PATCH] 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 '100000ou' --- src/changes.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/changes.cc b/src/changes.cc index 7feb82ec..f7ec8067 100644 --- a/src/changes.cc +++ b/src/changes.cc @@ -86,7 +86,7 @@ const Buffer::Change* backward_sorted_until(const Buffer::Change* first, const B if (first != last) { const Buffer::Change* next = first; while (++next != last) { - if (first->begin <= next->end) + if (first->begin < next->end) return next; first = next; }