diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-03-06 14:59:50 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-03-13 22:09:27 +0100 |
commit | 34c909b41eee5e872778d00d5942d79418a58469 (patch) | |
tree | 043b6d6f0a5bfdeec298692702f5cba6baa0b32c /scene | |
parent | b1c8a4085319ff5433da3868c5784fbecb2c8f6b (diff) |
[TextEdit] Do not draw virtual spaces (word break / justification points).
(cherry picked from commit 25bc62ad13372490e7ba2c889174ceca34d1f33f)
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 7ab33d5c6c..8f425436b7 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1263,7 +1263,7 @@ void TextEdit::_notification(int p_what) { if (draw_tabs && ((glyphs[j].flags & TextServer::GRAPHEME_IS_TAB) == TextServer::GRAPHEME_IS_TAB)) { int yofs = (text_height - tab_icon->get_height()) / 2 - ldata->get_line_ascent(line_wrap_index); tab_icon->draw(ci, Point2(char_pos, ofs_y + yofs), gl_color); - } else if (draw_spaces && ((glyphs[j].flags & TextServer::GRAPHEME_IS_SPACE) == TextServer::GRAPHEME_IS_SPACE)) { + } else if (draw_spaces && ((glyphs[j].flags & TextServer::GRAPHEME_IS_SPACE) == TextServer::GRAPHEME_IS_SPACE) && ((glyphs[j].flags & TextServer::GRAPHEME_IS_VIRTUAL) != TextServer::GRAPHEME_IS_VIRTUAL)) { int yofs = (text_height - space_icon->get_height()) / 2 - ldata->get_line_ascent(line_wrap_index); int xofs = (glyphs[j].advance * glyphs[j].repeat - space_icon->get_width()) / 2; space_icon->draw(ci, Point2(char_pos + xofs, ofs_y + yofs), gl_color); |