aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/editor.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r--helix-view/src/editor.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs
index 0a2dc54d..a16cc50f 100644
--- a/helix-view/src/editor.rs
+++ b/helix-view/src/editor.rs
@@ -270,6 +270,10 @@ impl Editor {
self.documents.get(id)
}
+ pub fn document_mut(&mut self, id: DocumentId) -> Option<&mut Document> {
+ self.documents.get_mut(id)
+ }
+
pub fn documents(&self) -> impl Iterator<Item = &Document> {
self.documents.iter().map(|(_id, doc)| doc)
}