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:
parent
88baf171c3
commit
08539b32d0
11 changed files with 283 additions and 6 deletions
|
@ -49,3 +49,4 @@ windows.workspace = true
|
|||
|
||||
[features]
|
||||
default = []
|
||||
test-support = ["multi_buffer/test-support"]
|
||||
|
|
|
@ -33,7 +33,7 @@ use crate::git_panel::{GitPanel, GitPanelAddon, GitStatusEntry};
|
|||
|
||||
actions!(git, [Diff]);
|
||||
|
||||
pub(crate) struct ProjectDiff {
|
||||
pub struct ProjectDiff {
|
||||
multibuffer: Entity<MultiBuffer>,
|
||||
editor: Entity<Editor>,
|
||||
project: Entity<Project>,
|
||||
|
@ -438,6 +438,15 @@ impl ProjectDiff {
|
|||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn excerpt_paths(&self, cx: &App) -> Vec<String> {
|
||||
self.multibuffer
|
||||
.read(cx)
|
||||
.excerpt_paths()
|
||||
.map(|key| key.path().to_string_lossy().to_string())
|
||||
.collect()
|
||||
}
|
||||
}
|
||||
|
||||
impl EventEmitter<EditorEvent> for ProjectDiff {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue