Merge pull request #75597 from bruvzg/tx_block

[TextEdit] Fix block caret size at the end of the line.
This commit is contained in:
Rémi Verschelde 2023-04-03 16:06:02 +02:00
commit 1db9de5406
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -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;