Project Diff 2 (#23891)
This adds a new version of the project diff editor to go alongside the new git panel. The basics seem to be working, but still todo: * [ ] Fix untracked files * [ ] Fix deleted files * [ ] Show commit message editor at top * [x] Handle empty state * [x] Fix panic where locator sometimes seeks to wrong excerpt Release Notes: - N/A
This commit is contained in:
parent
27a413a5e3
commit
45708d2680
21 changed files with 1023 additions and 125 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::{
|
||||
cmp::Ordering,
|
||||
ops::{Add, AddAssign, Sub},
|
||||
ops::{Add, AddAssign, Range, Sub},
|
||||
};
|
||||
|
||||
/// A zero-indexed point in a text buffer consisting of a row and column.
|
||||
|
@ -20,6 +20,16 @@ impl Point {
|
|||
Point { row, column }
|
||||
}
|
||||
|
||||
pub fn row_range(range: Range<u32>) -> Range<Self> {
|
||||
Point {
|
||||
row: range.start,
|
||||
column: 0,
|
||||
}..Point {
|
||||
row: range.end,
|
||||
column: 0,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn zero() -> Self {
|
||||
Point::new(0, 0)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue