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) {
|
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(
|
fn match_index_for_direction(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue