Revert "Start tracking edits performed by the agent" (#27077)

Reverts zed-industries/zed#27064
This commit is contained in:
Antonio Scandurra 2025-03-19 15:33:08 +01:00 committed by GitHub
parent 584a70ca5e
commit 3edf930007
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 346 additions and 1425 deletions

View file

@ -1498,9 +1498,9 @@ impl Buffer {
.flat_map(|transaction| self.edited_ranges_for_transaction(transaction))
}
pub fn edited_ranges_for_edit_ids<'a, D>(
pub fn edited_ranges_for_transaction<'a, D>(
&'a self,
edit_ids: impl IntoIterator<Item = &'a clock::Lamport>,
transaction: &'a Transaction,
) -> impl 'a + Iterator<Item = Range<D>>
where
D: TextDimension,
@ -1508,7 +1508,7 @@ impl Buffer {
// get fragment ranges
let mut cursor = self.fragments.cursor::<(Option<&Locator>, usize)>(&None);
let offset_ranges = self
.fragment_ids_for_edits(edit_ids.into_iter())
.fragment_ids_for_edits(transaction.edit_ids.iter())
.into_iter()
.filter_map(move |fragment_id| {
cursor.seek_forward(&Some(fragment_id), Bias::Left, &None);
@ -1547,16 +1547,6 @@ impl Buffer {
})
}
pub fn edited_ranges_for_transaction<'a, D>(
&'a self,
transaction: &'a Transaction,
) -> impl 'a + Iterator<Item = Range<D>>
where
D: TextDimension,
{
self.edited_ranges_for_edit_ids(&transaction.edit_ids)
}
pub fn subscribe(&mut self) -> Subscription {
self.subscriptions.subscribe()
}