editor: Start transaction in replace impl (#3036)

This fixes the undo with replace in project
/cc @maxbrunsfeld 

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2023-09-26 19:21:15 +02:00 committed by GitHub
parent 36f022bb58
commit 8c47f117db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -996,7 +996,9 @@ impl SearchableItem for Editor {
};
if let Some(replacement) = query.replacement_for(&text) {
self.edit([(identifier.clone(), Arc::from(&*replacement))], cx);
self.transact(cx, |this, cx| {
this.edit([(identifier.clone(), Arc::from(&*replacement))], cx);
});
}
}
fn match_index_for_direction(