From 7bcfbd055c19c2cf37f5dd64a7e532eb38585052 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 11 Jun 2017 12:24:45 +0100 Subject: Fix corner case in compute_modified_ranges --- src/selection.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/selection.cc b/src/selection.cc index 4724e896..14879386 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -183,7 +183,7 @@ Vector compute_modified_ranges(Buffer& buffer, size_t timestamp) } auto touches = [&](const Selection& lhs, const Selection& rhs) { - return buffer.char_next(lhs.max()) >= rhs.min(); + return lhs.max() == end_coord or buffer.char_next(lhs.max()) >= rhs.min(); }; size_t dummy = 0; ranges.erase(merge_overlapping(ranges.begin(), ranges.end(), dummy, touches), ranges.end()); -- cgit v1.2.3