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:
@@ -133,6 +133,10 @@ impl FileStatus {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn has_changes(&self) -> bool {
|
||||
self.is_modified() || self.is_created() || self.is_deleted() || self.is_untracked()
|
||||
}
|
||||
|
||||
pub fn is_modified(self) -> bool {
|
||||
match self {
|
||||
FileStatus::Tracked(tracked) => match (tracked.index_status, tracked.worktree_status) {
|
||||
|
||||
Reference in New Issue
Block a user