Rework inline assistant
This commit is contained in:
parent
b6035ee6a6
commit
c1bd035875
14 changed files with 600 additions and 438 deletions
|
@ -22,6 +22,7 @@ use postage::{oneshot, prelude::*};
|
|||
|
||||
pub use rope::*;
|
||||
pub use selection::*;
|
||||
use util::ResultExt;
|
||||
|
||||
use std::{
|
||||
cmp::{self, Ordering, Reverse},
|
||||
|
@ -1206,6 +1207,14 @@ impl Buffer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn undo_and_forget(&mut self, transaction_id: TransactionId) -> Option<Operation> {
|
||||
if let Some(transaction) = self.history.forget(transaction_id) {
|
||||
self.undo_or_redo(transaction).log_err()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::needless_collect)]
|
||||
pub fn undo_to_transaction(&mut self, transaction_id: TransactionId) -> Vec<Operation> {
|
||||
let transactions = self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue