From 66c69e538e2d09ef51368e341c83a622c45373f7 Mon Sep 17 00:00:00 2001 From: Nathan Sobo Date: Mon, 21 Feb 2022 11:41:15 -0700 Subject: [PATCH] Don't offset text vertically with gutter margin Fixes #467 Co-Authored-By: Antonio Scandurra Co-Authored-By: Max Brunsfeld --- crates/editor/src/element.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/editor/src/element.rs b/crates/editor/src/element.rs index 10a7656f73..a280ff649f 100644 --- a/crates/editor/src/element.rs +++ b/crates/editor/src/element.rs @@ -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));