fix: decode lsp url for workspace_diagnostics_picker (#6016)

This commit is contained in:
Erasin 2023-02-16 22:33:54 +08:00 committed by GitHub
parent 9368ac76b3
commit b7fb52d0e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -145,7 +145,8 @@ impl ui::menu::Item for PickerDiagnostic {
let path = match format {
DiagnosticsFormat::HideSourcePath => String::new(),
DiagnosticsFormat::ShowSourcePath => {
let path = path::get_truncated_path(self.url.path());
let file_path = self.url.to_file_path().unwrap();
let path = path::get_truncated_path(file_path);
format!("{}: ", path.to_string_lossy())
}
};