diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-06-11 12:24:45 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-06-11 12:25:12 +0100 |
| commit | 7bcfbd055c19c2cf37f5dd64a7e532eb38585052 (patch) | |
| tree | ce3258cfec1d1028a68b96f36d1b8dd9de64ef57 /src/selection.cc | |
| parent | 63a791d65118bf37606db36ee12287e890d528ea (diff) | |
Fix corner case in compute_modified_ranges
Diffstat (limited to 'src/selection.cc')
| -rw-r--r-- | src/selection.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<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()); |
