Ensure muiltibuffer anchors are contained within their excerpt ranges

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
This commit is contained in:
Max Brunsfeld 2021-12-15 10:52:27 -08:00
parent cec0c5912c
commit 4bea16eb31
3 changed files with 126 additions and 79 deletions

View file

@ -14,13 +14,6 @@ pub struct Anchor {
}
impl Anchor {
pub fn new(excerpt_id: ExcerptId, text_anchor: text::Anchor) -> Self {
Self {
excerpt_id,
text_anchor,
}
}
pub fn min() -> Self {
Self {
excerpt_id: ExcerptId::min(),