VC: hopfully fixed

This commit is contained in:
2026-06-21 22:06:19 +02:00
parent c735441f37
commit ee95fc60fc
+9 -5
View File
@@ -805,11 +805,13 @@ async fn handle_ra_notifications(
let mist_uri = rust_uri_to_mist_uri(&rust_uri);
let mapped_diagnostics: Vec<Diagnostic> = if let Some(ref _mist_uri) = mist_uri
{
let mapped_diagnostics: Vec<Diagnostic> =
if let Some(ref _mist_uri) = mist_uri {
let rust_path = rust_uri.to_file_path().ok();
let map_data =
rust_path.and_then(|p| mapping.blocking_lock().get(&p).cloned());
let map_data = match rust_path {
Some(ref p) => mapping.lock().await.get(p).cloned(),
None => None,
};
diagnostics
.into_iter()
@@ -828,7 +830,9 @@ async fn handle_ra_notifications(
let final_end = Position {
line: mist_end_pos.line.max(mist_start_pos.line),
character: if mist_end_pos.line == mist_start_pos.line {
mist_end_pos.character.max(mist_start_pos.character + 1)
mist_end_pos
.character
.max(mist_start_pos.character + 1)
} else {
mist_end_pos.character.max(1)
},