Fix rejecting multiple hunks in AgentDiff
(#28806)
Release Notes: - Fixed a bug that caused `Reject All` to not always reject _all_ the hunks. Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
This commit is contained in:
parent
7e6387052f
commit
06ad45ce08
3 changed files with 188 additions and 38 deletions
|
@ -1801,14 +1801,14 @@ impl Thread {
|
|||
.update(cx, |action_log, cx| action_log.keep_all_edits(cx));
|
||||
}
|
||||
|
||||
pub fn reject_edits_in_range(
|
||||
pub fn reject_edits_in_ranges(
|
||||
&mut self,
|
||||
buffer: Entity<language::Buffer>,
|
||||
buffer_range: Range<language::Anchor>,
|
||||
buffer_ranges: Vec<Range<language::Anchor>>,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Task<Result<()>> {
|
||||
self.action_log.update(cx, |action_log, cx| {
|
||||
action_log.reject_edits_in_range(buffer, buffer_range, cx)
|
||||
action_log.reject_edits_in_ranges(buffer, buffer_ranges, cx)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue