aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/commands/lsp.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs
index d1fb32a8..3b94c9bd 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())
}
};