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:
Antonio Scandurra 2025-04-15 13:15:58 -07:00 committed by GitHub
parent 7e6387052f
commit 06ad45ce08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 188 additions and 38 deletions

View file

@ -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)
})
}