Fix corner case in compute_modified_ranges
This commit is contained in:
parent
63a791d651
commit
7bcfbd055c
|
@ -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());
|
||||
|
|
1
test/regression/0-undo-change-at-eof/cmd
Normal file
1
test/regression/0-undo-change-at-eof/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
<a-l>yjxRu
|
2
test/regression/0-undo-change-at-eof/in
Normal file
2
test/regression/0-undo-change-at-eof/in
Normal file
|
@ -0,0 +1,2 @@
|
|||
copy
|
||||
paste
|
2
test/regression/0-undo-change-at-eof/out
Normal file
2
test/regression/0-undo-change-at-eof/out
Normal file
|
@ -0,0 +1,2 @@
|
|||
copy
|
||||
paste
|
Loading…
Reference in New Issue
Block a user