@@ -2497,6 +2497,8 @@ fn goto_impl(
2497 align_view(doc, view, Align::Center);
2497 align_view(doc, view, Align::Center);
2500+ let cwdir = std::env::current_dir().expect("couldn't determine current directory");
2500 match locations.as_slice() {
2502 match locations.as_slice() {
2501 [location] => {
2503 [location] => {
2502 jump_to(editor, location, offset_encoding, Action::Replace);
2504 jump_to(editor, location, offset_encoding, Action::Replace);
@@ -2507,8 +2509,23 @@ fn goto_impl(
2507 _locations => {
2509 _locations => {
2508 let picker = ui::Picker::new(
2510 let picker = ui::Picker::new(
2509 locations,
2511 locations,
2510− |location| {
2512+ move |location| {
2513+ let file: Cow<'_, str> = (location.uri.scheme() == "file")
2519+ // strip root prefix
2520+ path.strip_prefix(&cwdir)
2521+ .map(|path| path.to_path_buf())
2525+ .and_then(|path| path.to_str().map(|path| path.to_owned().into()))
2511− let file = location.uri.as_str();
2528+ .unwrap_or_else(|| location.uri.as_str().into());
2512 let line = location.range.start.line;
2529 let line = location.range.start.line;
2513 format!("{}:{}", file, line).into()
2530 format!("{}:{}", file, line).into()