Remove anchor collections

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Antonio Scandurra
2021-12-09 17:28:27 +01:00
co-authored by Nathan Sobo
parent 67686dd1c2
commit 65711b2256
18 changed files with 659 additions and 322 deletions
+2 -2
View File
@@ -141,13 +141,13 @@ impl SelectionSet {
let end = snapshot.anchor_at(range.end.0, range.end.1);
let start_ix = match self
.selections
.binary_search_by(|probe| probe.start.cmp(&start, snapshot).unwrap())
.binary_search_by(|probe| probe.end.cmp(&start, snapshot).unwrap())
{
Ok(ix) | Err(ix) => ix,
};
let end_ix = match self
.selections
.binary_search_by(|probe| probe.end.cmp(&end, snapshot).unwrap())
.binary_search_by(|probe| probe.start.cmp(&end, snapshot).unwrap())
{
Ok(ix) | Err(ix) => ix,
};