Skip to content

Commit 67f41b9

Browse files
committed
Update document by path
1 parent 4126a79 commit 67f41b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

helix-term/src/handlers/diagnostics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ fn handle_pull_diagnostics_response(
282282
for (url, report) in related_documents.into_iter().flatten() {
283283
let result_id = match report {
284284
lsp::DocumentDiagnosticReportKind::Full(report) => {
285-
let Ok(uri) = Uri::try_from(url) else {
285+
let Ok(uri) = Uri::try_from(&url) else {
286286
continue;
287287
};
288288

@@ -292,7 +292,7 @@ fn handle_pull_diagnostics_response(
292292
lsp::DocumentDiagnosticReportKind::Unchanged(report) => Some(report.result_id),
293293
};
294294

295-
if let Some(doc) = editor.document_mut(document_id) {
295+
if let Some(doc) = editor.document_by_path_mut(url.path()) {
296296
doc.previous_diagnostic_id = result_id;
297297
}
298298
}

0 commit comments

Comments
 (0)