diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index d1fb32a8e..3b94c9bd5 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -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()) } };