diff options
author | Joe Neeman | 2021-06-23 18:35:39 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-30 08:08:50 +0000 |
commit | c9be480bf86489fbf659b45b107be0d26a076b50 (patch) | |
tree | 93272263cd449d39e40848788e036c07f122250f /helix-view/src/editor.rs | |
parent | 3007478567c45274e405ec3b57a273bfa0025cc9 (diff) |
Make formatting happen asynchronously.
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 4 |
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) } |