@@ -1291,6 +1291,7 @@ fn global_search(cx: &mut Context) {
12911291
12921292 cx.push_layer(Box::new(prompt));
12931293
1294+ let root = find_root(None).unwrap_or_else(|| PathBuf::from("./"));
12941295 let show_picker = async move {
12951296 let all_matches: Vec<(usize, PathBuf)> =
12961297 UnboundedReceiverStream::new(all_matches_rx).collect().await;
@@ -1302,7 +1303,13 @@ fn global_search(cx: &mut Context) {
13021303 }
13031304 let picker = FilePicker::new(
13041305 all_matches,
1305− move |(_line_num, path)| path.to_str().unwrap().into(),
1306+ move |(_line_num, path)| {
1307+ path.strip_prefix(&root)
1308+ .unwrap_or(path)
1309+ .to_str()
1310+ .unwrap()
1311+ .into()
1312+ },
13061313 move |editor: &mut Editor, (line_num, path), action| {
13071314 match editor.open(path.into(), action) {
13081315 Ok(_) => {}