VC: hopfully fixed
This commit is contained in:
@@ -805,11 +805,13 @@ async fn handle_ra_notifications(
|
|||||||
|
|
||||||
let mist_uri = rust_uri_to_mist_uri(&rust_uri);
|
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 rust_path = rust_uri.to_file_path().ok();
|
||||||
let map_data =
|
let map_data = match rust_path {
|
||||||
rust_path.and_then(|p| mapping.blocking_lock().get(&p).cloned());
|
Some(ref p) => mapping.lock().await.get(p).cloned(),
|
||||||
|
None => None,
|
||||||
|
};
|
||||||
|
|
||||||
diagnostics
|
diagnostics
|
||||||
.into_iter()
|
.into_iter()
|
||||||
@@ -828,7 +830,9 @@ async fn handle_ra_notifications(
|
|||||||
let final_end = Position {
|
let final_end = Position {
|
||||||
line: mist_end_pos.line.max(mist_start_pos.line),
|
line: mist_end_pos.line.max(mist_start_pos.line),
|
||||||
character: if mist_end_pos.line == 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 {
|
} else {
|
||||||
mist_end_pos.character.max(1)
|
mist_end_pos.character.max(1)
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user