mirror of https://github.com/helix-editor/helix
nit: move an allocation to happen after a `continue`, making sure it's
not done for nothingpull/4406/head
parent
5a848344a9
commit
3aea33a415
|
@ -597,14 +597,14 @@ impl Application {
|
||||||
|
|
||||||
// trigger textDocument/didOpen for docs that are already open
|
// trigger textDocument/didOpen for docs that are already open
|
||||||
for doc in docs {
|
for doc in docs {
|
||||||
let language_id =
|
|
||||||
doc.language_id().map(ToOwned::to_owned).unwrap_or_default();
|
|
||||||
|
|
||||||
let url = match doc.url() {
|
let url = match doc.url() {
|
||||||
Some(url) => url,
|
Some(url) => url,
|
||||||
None => continue, // skip documents with no path
|
None => continue, // skip documents with no path
|
||||||
};
|
};
|
||||||
|
|
||||||
|
let language_id =
|
||||||
|
doc.language_id().map(ToOwned::to_owned).unwrap_or_default();
|
||||||
|
|
||||||
tokio::spawn(language_server.text_document_did_open(
|
tokio::spawn(language_server.text_document_did_open(
|
||||||
url,
|
url,
|
||||||
doc.version(),
|
doc.version(),
|
||||||
|
|
Loading…
Reference in New Issue