summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-23 07:45:17 +0200
committerGitHub <noreply@github.com>2019-05-23 07:45:17 +0200
commit1acc918166e653eb4121868e8000991e9485ac83 (patch)
tree7fb619e35addc42f89c01cf12012207c31807454 /scene/gui
parentfa5cc1da7a83ca7bdf685ba243e207bcd5de7370 (diff)
parentde378ef0128cbca2ab524f915eac389cb5c4b000 (diff)
Merge pull request #28847 from YeldhamDev/textedit_wrap_highlight_fix
Fix 'TextEdit's line wrapping being highlighted incorrectly
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 380b670368..e039558abc 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1106,7 +1106,7 @@ void TextEdit::_notification(int p_what) {
if (line == cursor.line && cursor_wrap_index == line_wrap_index && highlight_current_line) {
// draw the wrap indent offset highlight
if (line_wrap_index != 0 && j == 0) {
- VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(char_ofs + char_margin - indent_px, ofs_y, (char_ofs + char_margin), get_row_height()), cache.current_line_color);
+ VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2(char_ofs + char_margin - indent_px, ofs_y, indent_px, get_row_height()), cache.current_line_color);
}
// if its the last char draw to end of the line
if (j == str.length() - 1) {