Fix some syncing issues with git statuses (#25535)

Like the real app, this one infinite loops if you have a diff in an
UnsharedFile.

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
Conrad Irwin 2025-02-25 22:09:02 -07:00 committed by GitHub
parent 88baf171c3
commit 08539b32d0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 283 additions and 6 deletions

View file

@ -165,6 +165,10 @@ impl PathKey {
pub fn namespaced(namespace: &'static str, path: Arc<Path>) -> Self {
Self { namespace, path }
}
pub fn path(&self) -> &Arc<Path> {
&self.path
}
}
pub type MultiBufferPoint = Point;
@ -1453,6 +1457,11 @@ impl MultiBuffer {
excerpt.range.context.start,
))
}
pub fn excerpt_paths(&self) -> impl Iterator<Item = &PathKey> {
self.buffers_by_path.keys()
}
/// Sets excerpts, returns `true` if at least one new excerpt was added.
pub fn set_excerpts_for_path(
&mut self,