mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-24 17:28:40 +00:00
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:
parent
36f022bb58
commit
8c47f117db
1 changed files with 3 additions and 1 deletions
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue