From b7fb52d0e4dff13bab07ff081ec86808e265466f Mon Sep 17 00:00:00 2001 From: Erasin Date: Thu, 16 Feb 2023 22:33:54 +0800 Subject: [PATCH] fix: decode lsp url for workspace_diagnostics_picker (#6016) --- helix-term/src/commands/lsp.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()) } };