Don't insert headers in MultiBuffer

This lays the groundwork to insert headers in the block map instead.
This commit is contained in:
Antonio Scandurra 2021-12-21 16:38:18 +01:00
parent 99317bbd62
commit 8534a9cc41
4 changed files with 165 additions and 385 deletions

View file

@ -38,7 +38,7 @@ impl Point {
pub fn saturating_sub(self, other: Self) -> Self {
if self < other {
Point::zero()
Self::zero()
} else {
self - other
}

View file

@ -26,6 +26,14 @@ impl PointUtf16 {
pub fn is_zero(&self) -> bool {
self.row == 0 && self.column == 0
}
pub fn saturating_sub(self, other: Self) -> Self {
if self < other {
Self::zero()
} else {
self - other
}
}
}
impl<'a> Add<&'a Self> for PointUtf16 {