Merge pull request #676 from zed-industries/highlighted-text-fix
Highlighted text fix
This commit is contained in:
commit
8f75520ade
15 changed files with 306 additions and 212 deletions
|
@ -1821,20 +1821,12 @@ impl BufferSnapshot {
|
|||
})
|
||||
.map(move |(replica_id, set)| {
|
||||
let start_ix = match set.selections.binary_search_by(|probe| {
|
||||
probe
|
||||
.end
|
||||
.cmp(&range.start, self)
|
||||
.unwrap()
|
||||
.then(Ordering::Greater)
|
||||
probe.end.cmp(&range.start, self).then(Ordering::Greater)
|
||||
}) {
|
||||
Ok(ix) | Err(ix) => ix,
|
||||
};
|
||||
let end_ix = match set.selections.binary_search_by(|probe| {
|
||||
probe
|
||||
.start
|
||||
.cmp(&range.end, self)
|
||||
.unwrap()
|
||||
.then(Ordering::Less)
|
||||
probe.start.cmp(&range.end, self).then(Ordering::Less)
|
||||
}) {
|
||||
Ok(ix) | Err(ix) => ix,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue