Don't offset text vertically with gutter margin
Nathan Sobo
,
Antonio Scandurra
, and
Max Brunsfeld
created
Fixes #467
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
Co-Authored-By: Max Brunsfeld <maxbrunsfeld@gmail.com>
Change summary
crates/editor/src/element.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Detailed changes
@@ -321,7 +321,7 @@ impl EditorElement {
let end_row = ((scroll_top + bounds.height()) / layout.line_height).ceil() as u32 + 1; // Add 1 to ensure selections bleed off screen
let max_glyph_width = layout.em_width;
let scroll_left = scroll_position.x() * max_glyph_width;
- let content_origin = bounds.origin() + layout.gutter_margin;
+ let content_origin = bounds.origin() + vec2f(layout.gutter_margin, 0.);
cx.scene.push_layer(Some(bounds));