Make writing/reading FoldMap explicit so that we can retrieve edits

This commit is contained in:
Antonio Scandurra
2021-07-16 13:49:38 +02:00
parent 23b55d88d9
commit 831b620e51
4 changed files with 243 additions and 203 deletions
+13
View File
@@ -1930,6 +1930,19 @@ pub struct Snapshot {
query_cursor: QueryCursorHandle,
}
impl Clone for Snapshot {
fn clone(&self) -> Self {
Self {
visible_text: self.visible_text.clone(),
fragments: self.fragments.clone(),
version: self.version.clone(),
tree: self.tree.clone(),
language: self.language.clone(),
query_cursor: QueryCursorHandle::new(),
}
}
}
impl Snapshot {
pub fn len(&self) -> usize {
self.visible_text.len()