Allow redoing edits performed by inline assistant after cancelling it
This commit is contained in:
parent
b9df85e01f
commit
52e1e014ad
4 changed files with 42 additions and 17 deletions
|
@ -1668,14 +1668,14 @@ impl Buffer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn undo_and_forget(
|
||||
pub fn undo_transaction(
|
||||
&mut self,
|
||||
transaction_id: TransactionId,
|
||||
cx: &mut ModelContext<Self>,
|
||||
) -> bool {
|
||||
let was_dirty = self.is_dirty();
|
||||
let old_version = self.version.clone();
|
||||
if let Some(operation) = self.text.undo_and_forget(transaction_id) {
|
||||
if let Some(operation) = self.text.undo_transaction(transaction_id) {
|
||||
self.send_operation(Operation::Buffer(operation), cx);
|
||||
self.did_edit(&old_version, was_dirty, cx);
|
||||
true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue