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.

editor: Properly layout expand toggles with git blame enabled (#38349)

Finn Eversf0b21508ec64
diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs
index 2212507e38b..37ae90d70b9 100644
--- a/crates/editor/src/element.rs
+++ b/crates/editor/src/element.rs
@@ -3019,6 +3019,12 @@ impl EditorElement {
.ilog10()
+ 1;
+ let git_gutter_width = Self::gutter_strip_width(line_height)
+ + gutter_dimensions
+ .git_blame_entries_width
+ .unwrap_or_default();
+ let available_width = gutter_dimensions.left_padding - git_gutter_width;
+
buffer_rows
.iter()
.enumerate()
@@ -3034,9 +3040,6 @@ impl EditorElement {
ExpandExcerptDirection::UpAndDown => IconName::ExpandVertical,
};
- let git_gutter_width = Self::gutter_strip_width(line_height);
- let available_width = gutter_dimensions.left_padding - git_gutter_width;
-
let editor = self.editor.clone();
let is_wide = max_line_number_length
>= EditorSettings::get_global(cx).gutter.min_line_number_digits as u32