Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix outline panel navigation in unnamed files (#23273)

Kirill Bulatov37dcca62b741
diff --git a/crates/outline_panel/src/outline_panel.rs b/crates/outline_panel/src/outline_panel.rs
index 64904b74545..9178704b828 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;
}