Basic side-by-side diff implementation (#43586)

Release Notes:

- N/A

---------

Co-authored-by: cameron <cameron.studdstreet@gmail.com>
Co-authored-by: Cameron <cameron@zed.dev>
This commit is contained in:
Cole Miller
2025-11-30 22:45:01 -05:00
committed by GitHub
co-authored by cameron Cameron
parent ca6e64d451
commit 2e00f40c54
29 changed files with 1915 additions and 518 deletions
+8 -1
View File
@@ -1,15 +1,22 @@
use std::{
cmp::Ordering,
fmt::{self, Debug},
ops::{Add, AddAssign, Range, Sub},
};
/// A zero-indexed point in a text buffer consisting of a row and column.
#[derive(Clone, Copy, Default, Eq, PartialEq, Debug, Hash)]
#[derive(Clone, Copy, Default, Eq, PartialEq, Hash)]
pub struct Point {
pub row: u32,
pub column: u32,
}
impl Debug for Point {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "Point({}:{})", self.row, self.column)
}
}
impl Point {
pub const MAX: Self = Self {
row: u32::MAX,