@@ -1291,7 +1291,8 @@ fn global_search(cx: &mut Context) {
1292 cx.push_layer(Box::new(prompt));
1292 cx.push_layer(Box::new(prompt));
1294− let root = find_root(None).unwrap_or_else(|| PathBuf::from("./"));
1294+ let current_path = doc_mut!(cx.editor).path().cloned();
1295 let show_picker = async move {
1296 let show_picker = async move {
1296 let all_matches: Vec<(usize, PathBuf)> =
1297 let all_matches: Vec<(usize, PathBuf)> =
1297 UnboundedReceiverStream::new(all_matches_rx).collect().await;
1298 UnboundedReceiverStream::new(all_matches_rx).collect().await;
@@ -1301,14 +1302,19 @@ fn global_search(cx: &mut Context) {
1301 editor.set_status("No matches found".to_string());
1302 editor.set_status("No matches found".to_string());
1304 let picker = FilePicker::new(
1306 let picker = FilePicker::new(
1305 all_matches,
1307 all_matches,
1306 move |(_line_num, path)| {
1308 move |(_line_num, path)| {
1307− path.strip_prefix(&root)
1309+ let relative_path = helix_core::path::get_relative_path(path)
1309 .to_str()
1310 .to_str()
1310 .unwrap()
1311 .unwrap()
1311− .into()
1312+ .to_owned();
1313+ if current_path.as_ref().map(|p| p == path).unwrap_or(false) {
1314+ format!("{} (*)", relative_path).into()
1316+ relative_path.into()
1313 move |editor: &mut Editor, (line_num, path), action| {
1319 move |editor: &mut Editor, (line_num, path), action| {
1314 match editor.open(path.into(), action) {
1320 match editor.open(path.into(), action) {