mirror of
https://github.com/godotengine/godot.git
synced 2024-12-04 01:52:56 +00:00
[LineEdit] Update line edit offset on text delete.
This commit is contained in:
parent
0bca424239
commit
6a1fdc213c
@ -1513,11 +1513,7 @@ void LineEdit::delete_text(int p_from_column, int p_to_column) {
|
||||
text = text.left(p_from_column) + text.substr(p_to_column);
|
||||
_shape();
|
||||
|
||||
caret_column -= CLAMP(caret_column - p_from_column, 0, p_to_column - p_from_column);
|
||||
|
||||
if (caret_column >= text.length()) {
|
||||
caret_column = text.length();
|
||||
}
|
||||
set_caret_column(caret_column - CLAMP(caret_column - p_from_column, 0, p_to_column - p_from_column));
|
||||
|
||||
if (!text_changed_dirty) {
|
||||
if (is_inside_tree()) {
|
||||
|
Loading…
Reference in New Issue
Block a user