Test undo/redo at editor layer, including selection restoration

This commit is contained in:
Nathan Sobo 2021-12-12 15:04:19 -07:00
parent 44cd0be068
commit cdbcbdfe6d
5 changed files with 325 additions and 180 deletions

View file

@ -511,6 +511,10 @@ impl Buffer {
self.deferred_ops.len()
}
pub fn transaction_group_interval(&self) -> Duration {
self.history.group_interval
}
pub fn edit<R, I, S, T>(&mut self, ranges: R, new_text: T) -> EditOperation
where
R: IntoIterator<IntoIter = I>,