From 5d168a38509c076886874b923a51071bc8e25357 Mon Sep 17 00:00:00 2001 From: rune-scape Date: Fri, 25 Oct 2024 21:59:19 -0700 Subject: [PATCH] CodeEdit: Fix line number margin --- scene/gui/code_edit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp index 7346c9dcd31f..a32e6decf7dc 100644 --- a/scene/gui/code_edit.cpp +++ b/scene/gui/code_edit.cpp @@ -1498,9 +1498,9 @@ void CodeEdit::_line_number_draw_callback(int p_line, int p_gutter, const Rect2 ofs.y += TS->shaped_text_get_ascent(text_rid); if (rtl) { - ofs.x = p_region.position.x; - } else { ofs.x = p_region.get_end().x - text_size.width; + } else { + ofs.x = p_region.position.x; } Color number_color = get_line_gutter_item_color(p_line, line_number_gutter);