diff --git a/crates/breadcrumbs/src/breadcrumbs.rs b/crates/breadcrumbs/src/breadcrumbs.rs index 85f0509caf..b8c66b1f87 100644 --- a/crates/breadcrumbs/src/breadcrumbs.rs +++ b/crates/breadcrumbs/src/breadcrumbs.rs @@ -42,10 +42,12 @@ impl View for Breadcrumbs { .as_ref() .and_then(|item| item.breadcrumbs(&theme, cx)) { + enum BreadcrumbTag {} Flex::row() .with_children(Itertools::intersperse_with(breadcrumbs.into_iter(), || { Label::new(" 〉 ".to_string(), theme.breadcrumbs.text.clone()).boxed() })) + .scrollable::(1, None, cx) .contained() .with_style(theme.breadcrumbs.container) .aligned() diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rs index bafabc6761..333511ee46 100644 --- a/crates/project/src/worktree.rs +++ b/crates/project/src/worktree.rs @@ -1843,12 +1843,10 @@ impl language::File for File { if worktree.is_visible() { full_path.push(worktree.root_name()); } else { - let home_dir = cx.global::(); - let local_path = worktree.as_local().map(|local| local.abs_path.clone()); - if let Some(path) = local_path { - if let Ok(path) = path.strip_prefix(home_dir.0.as_path()) { + if let Some(path) = worktree.as_local().map(|local| local.abs_path.clone()) { + if let Ok(trimmed_path) = path.strip_prefix(cx.global::().0.as_path()) { full_path.push("~"); - full_path.push(path); + full_path.push(trimmed_path); } else { full_path.push(path) } diff --git a/crates/workspace/src/workspace.rs b/crates/workspace/src/workspace.rs index ece8cedfb1..04a59c47b1 100644 --- a/crates/workspace/src/workspace.rs +++ b/crates/workspace/src/workspace.rs @@ -927,6 +927,9 @@ impl From<&dyn NotificationHandle> for AnyViewHandle { impl AppState { #[cfg(any(test, feature = "test-support"))] pub fn test(cx: &mut MutableAppContext) -> Arc { + use fs::HomeDir; + + cx.set_global(HomeDir(Path::new("/tmp/").to_path_buf())); let settings = Settings::test(cx); cx.set_global(settings);