Don't allow open excerpts in commit view for now (#27862)

Follow-up to https://github.com/zed-industries/zed/pull/27636

Release Notes:

- N/A
This commit is contained in:
Max Brunsfeld
2025-04-01 11:40:45 -07:00
committed by GitHub
parent 133d3f052f
commit b59967bbdf
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -2791,6 +2791,7 @@ impl EditorElement {
.as_ref()
.map(|project| project.read(cx).visible_worktrees(cx).count() > 1)
.unwrap_or_default();
let can_open_excerpts = Editor::can_open_excerpts_in_file(for_excerpt.buffer.file());
let path = for_excerpt.buffer.resolve_file_path(cx, include_root);
let filename = path
.as_ref()
@@ -2920,7 +2921,7 @@ impl EditorElement {
))
}),
)
.when(is_selected, |el| {
.when(can_open_excerpts && is_selected && path.is_some(), |el| {
el.child(
h_flex()
.id("jump-to-file-button")