Fix corner case in compute_modified_ranges

This commit is contained in:
Maxime Coste 2017-06-11 12:24:45 +01:00
parent 63a791d651
commit 7bcfbd055c
4 changed files with 6 additions and 1 deletions

View File

@ -183,7 +183,7 @@ Vector<Selection> 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());

View File

@ -0,0 +1 @@
<a-l>yjxRu

View File

@ -0,0 +1,2 @@
copy
paste

View File

@ -0,0 +1,2 @@
copy
paste