Get tests passing w/ multibuffer in editor
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
75dd37d873
commit
6caf016df9
2 changed files with 5 additions and 1 deletions
|
@ -31,6 +31,9 @@ impl Anchor {
|
|||
pub fn cmp<'a>(&self, other: &Anchor, snapshot: &MultiBufferSnapshot) -> Result<Ordering> {
|
||||
let excerpt_id_cmp = self.excerpt_id.cmp(&other.excerpt_id);
|
||||
if excerpt_id_cmp.is_eq() {
|
||||
if self.excerpt_id == ExcerptId::max() {
|
||||
return Ok(Ordering::Equal);
|
||||
}
|
||||
self.text_anchor.cmp(
|
||||
&other.text_anchor,
|
||||
snapshot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue