parent
5ac82161fa
commit
2f734cbd5e
1 changed files with 8 additions and 13 deletions
|
@ -12502,10 +12502,7 @@ impl Editor {
|
||||||
snapshot: &MultiBufferSnapshot,
|
snapshot: &MultiBufferSnapshot,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let mut hunks = self.diff_hunks_in_ranges(ranges, &snapshot);
|
let mut hunks = self.diff_hunks_in_ranges(ranges, &snapshot);
|
||||||
hunks.any(|hunk| {
|
hunks.any(|hunk| hunk.secondary_status == DiffHunkSecondaryStatus::HasSecondaryHunk)
|
||||||
log::debug!("considering {hunk:?}");
|
|
||||||
hunk.secondary_status == DiffHunkSecondaryStatus::HasSecondaryHunk
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn toggle_staged_selected_diff_hunks(
|
pub fn toggle_staged_selected_diff_hunks(
|
||||||
|
@ -14160,15 +14157,13 @@ impl Editor {
|
||||||
let buffer_id = buffer.read(cx).remote_id();
|
let buffer_id = buffer.read(cx).remote_id();
|
||||||
if self.buffer.read(cx).diff_for(buffer_id).is_none() {
|
if self.buffer.read(cx).diff_for(buffer_id).is_none() {
|
||||||
if let Some(project) = &self.project {
|
if let Some(project) = &self.project {
|
||||||
self.load_diff_task = Some(
|
get_uncommitted_diff_for_buffer(
|
||||||
get_uncommitted_diff_for_buffer(
|
project,
|
||||||
project,
|
[buffer.clone()],
|
||||||
[buffer.clone()],
|
self.buffer.clone(),
|
||||||
self.buffer.clone(),
|
cx,
|
||||||
cx,
|
)
|
||||||
)
|
.detach();
|
||||||
.shared(),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cx.emit(EditorEvent::ExcerptsAdded {
|
cx.emit(EditorEvent::ExcerptsAdded {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue