Skip to content

Commit

Permalink
Merge pull request #75597 from bruvzg/tx_block
Browse files Browse the repository at this point in the history
[TextEdit] Fix block caret size at the end of the line.
  • Loading branch information
akien-mga committed Apr 3, 2023
2 parents f8e0880 + efe04af commit 1db9de5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/gui/text_edit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1385,7 +1385,7 @@ void TextEdit::_notification(int p_what) {
ts_caret.l_caret.position.y += ts_caret.l_caret.size.y;
ts_caret.l_caret.size.y = caret_width;
}
if (ts_caret.l_caret.position.x >= TS->shaped_text_get_size(rid).x) {
if (Math::ceil(ts_caret.l_caret.position.x) >= TS->shaped_text_get_size(rid).x) {
ts_caret.l_caret.size.x = font->get_char_size('m', font_size).x;
} else {
ts_caret.l_caret.size.x = 3 * caret_width;
Expand Down

0 comments on commit 1db9de5

Please sign in to comment.