Skip to content

Commit 5214380

Browse files
committedFeb 25, 2024
Fixes godotengine#88632 by checking if line is wrapped before choosing the closest character
1 parent 81f3d43 commit 5214380

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎scene/gui/text_edit.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4340,7 +4340,7 @@ Point2i TextEdit::get_line_column_at_pos(const Point2i &p_pos, bool p_allow_out_
43404340
colx = TS->shaped_text_get_size(text_rid).x - colx;
43414341
}
43424342
col = TS->shaped_text_hit_test_position(text_rid, colx);
4343-
if (!caret_mid_grapheme_enabled) {
4343+
if (!caret_mid_grapheme_enabled && get_line_wrapping_mode() == LineWrappingMode::LINE_WRAPPING_NONE) {
43444344
col = TS->shaped_text_closest_character_pos(text_rid, col);
43454345
}
43464346

0 commit comments

Comments
 (0)
Please sign in to comment.