diff options
author | Blaž Hrastnik | 2021-09-01 05:38:47 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-09-06 06:25:46 +0000 |
commit | c00cf238afe3dbd43327fd74bd8a9ff2dd9c21db (patch) | |
tree | 63c8da75e676819acb7e7d9ffab39e79e3fc02e5 /helix-view | |
parent | 8744f367bdd3fce5e6cc6ee2b5198188598f5170 (diff) |
Simplify textDocument/didClose, we don't need to look up LSP again
Diffstat (limited to 'helix-view')
-rw-r--r-- | helix-view/src/editor.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 562c3c60..050f2645 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -287,14 +287,9 @@ impl Editor { if close_buffer { // get around borrowck issues - let language_servers = &mut self.language_servers; let doc = &self.documents[view.doc]; - let language_server = doc - .language - .as_ref() - .and_then(|language| language_servers.get(language).ok()); - if let Some(language_server) = language_server { + if let Some(language_server) = doc.language_server() { tokio::spawn(language_server.text_document_did_close(doc.identifier())); } self.documents.remove(view.doc); |