|
|
@ -1792,9 +1792,8 @@ fn global_search(cx: &mut Context) {
|
|
|
|
all_matches,
|
|
|
|
all_matches,
|
|
|
|
move |(_line_num, path)| {
|
|
|
|
move |(_line_num, path)| {
|
|
|
|
let relative_path = helix_core::path::get_relative_path(path)
|
|
|
|
let relative_path = helix_core::path::get_relative_path(path)
|
|
|
|
.to_str()
|
|
|
|
.to_string_lossy()
|
|
|
|
.unwrap()
|
|
|
|
.into_owned();
|
|
|
|
.to_owned();
|
|
|
|
|
|
|
|
if current_path.as_ref().map(|p| p == path).unwrap_or(false) {
|
|
|
|
if current_path.as_ref().map(|p| p == path).unwrap_or(false) {
|
|
|
|
format!("{} (*)", relative_path).into()
|
|
|
|
format!("{} (*)", relative_path).into()
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
@ -3536,9 +3535,8 @@ fn workspace_symbol_picker(cx: &mut Context) {
|
|
|
|
(&symbol.name).into()
|
|
|
|
(&symbol.name).into()
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
let relative_path = helix_core::path::get_relative_path(path.as_path())
|
|
|
|
let relative_path = helix_core::path::get_relative_path(path.as_path())
|
|
|
|
.to_str()
|
|
|
|
.to_string_lossy()
|
|
|
|
.unwrap()
|
|
|
|
.into_owned();
|
|
|
|
.to_owned();
|
|
|
|
|
|
|
|
format!("{} ({})", &symbol.name, relative_path).into()
|
|
|
|
format!("{} ({})", &symbol.name, relative_path).into()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -4209,8 +4207,8 @@ fn goto_impl(
|
|
|
|
.map(|path| path.to_path_buf())
|
|
|
|
.map(|path| path.to_path_buf())
|
|
|
|
.unwrap_or(path)
|
|
|
|
.unwrap_or(path)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
.map(|path| Cow::from(path.to_string_lossy().into_owned()))
|
|
|
|
.ok()
|
|
|
|
.ok()
|
|
|
|
.and_then(|path| path.to_str().map(|path| path.to_owned().into()))
|
|
|
|
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.flatten()
|
|
|
|
.flatten()
|
|
|
|
.unwrap_or_else(|| location.uri.as_str().into());
|
|
|
|
.unwrap_or_else(|| location.uri.as_str().into());
|
|
|
|