summaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/document.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs
index a27be8e6..5677eb44 100644
--- a/helix-view/src/document.rs
+++ b/helix-view/src/document.rs
@@ -471,10 +471,10 @@ impl Document {
let mut file = File::create(path).await?;
to_writer(&mut file, encoding, &text).await?;
- if let Some(language_server) = language_server {
- language_server
- .text_document_did_save(identifier, &text)
- .await?;
+ if let Some(notification) = language_server.and_then(|language_server| {
+ language_server.text_document_did_save(identifier, &text)
+ }) {
+ notification.await?;
}
Ok(())