From 37dcca62b741613b0314210dd1dcf71635fe50bc Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Fri, 17 Jan 2025 11:32:22 +0200 Subject: [PATCH] Fix outline panel navigation in unnamed files (#23273) Closes https://github.com/zed-industries/zed/issues/23250 Release Notes: - Fixed outline panel navigation in unnamed files --- crates/outline_panel/src/outline_panel.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/outline_panel/src/outline_panel.rs b/crates/outline_panel/src/outline_panel.rs index 64904b745453141d9027b3f7be24c7eb917ce45d..9178704b828e158c8c3c06d9ec83986ed09328ad 100644 --- a/crates/outline_panel/src/outline_panel.rs +++ b/crates/outline_panel/src/outline_panel.rs @@ -1066,7 +1066,9 @@ impl OutlinePanel { } } } else { - offset.y = -(active_editor.read(cx).file_header_size() as f32); + if multi_buffer_snapshot.as_singleton().is_none() { + offset.y = -(active_editor.read(cx).file_header_size() as f32); + } if show_excerpt_controls { offset.y -= expand_excerpt_control_height; }