From ed16df1807ec6b0ba4d0ade99a101ebedcf244dd Mon Sep 17 00:00:00 2001 From: Bronson Holden Date: Fri, 13 Oct 2023 10:49:58 -0700 Subject: [PATCH] Remove vertical scrollbar padding from line width calc Visibility of the vertical scrollbar is already accounted for in `_update_wrap_at_column` which in turn affects max line width of the text area. --- scene/gui/text_edit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 073f164bdd..93905b8b39 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -7340,7 +7340,7 @@ void TextEdit::_update_scrollbars() { } int visible_width = size.width - theme_cache.style_normal->get_minimum_size().width; - int total_width = (draw_placeholder ? placeholder_max_width : text.get_max_width()) + vmin.x + gutters_width + gutter_padding; + int total_width = (draw_placeholder ? placeholder_max_width : text.get_max_width()) + gutters_width + gutter_padding; if (draw_minimap) { total_width += minimap_width;