Don't insert headers in MultiBuffer
This lays the groundwork to insert headers in the block map instead.
This commit is contained in:
parent
99317bbd62
commit
8534a9cc41
4 changed files with 165 additions and 385 deletions
|
@ -38,7 +38,7 @@ impl Point {
|
|||
|
||||
pub fn saturating_sub(self, other: Self) -> Self {
|
||||
if self < other {
|
||||
Point::zero()
|
||||
Self::zero()
|
||||
} else {
|
||||
self - other
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue