From 43f76571517ac3b72bd7369e675f0500b9f31df5 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 20 May 2015 13:32:20 +0100 Subject: [PATCH] Remove clamping in compute_modified_range It can result in a non ordered range list. --- src/selection.cc | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/selection.cc b/src/selection.cc index f1fbf9b1..44850d80 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -312,11 +312,6 @@ Vector compute_modified_ranges(Buffer& buffer, size_t timestamp) std::inplace_merge(ranges.begin(), ranges.begin() + prev_size, ranges.end(), compare_selections); ranges.erase(merge_overlapping(ranges.begin(), ranges.end(), dummy, overlaps), ranges.end()); } - for (auto& sel : ranges) - { - sel.anchor() = buffer.clamp(sel.anchor()); - sel.cursor() = buffer.clamp(sel.cursor()); - } auto touches = [&](const Selection& lhs, const Selection& rhs) { return buffer.char_next(lhs.max()) >= rhs.min();