summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-06-02 18:20:45 +0200
committerGitHub <noreply@github.com>2022-06-02 18:20:45 +0200
commit52e36ab80edf1818bc35901fff1079be8ba37cfd (patch)
tree9f3e87fbdf1f3f08cc5f5a1ac4d45656eac7aa9c /scene
parentd9277fdab8bca6b89c5bc0fc37a442ff8df9abcf (diff)
parent848e759d88300c54160418ab8a43d0ca0ffed610 (diff)
Merge pull request #61631 from iwek7/redundant_min_call
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 0f74c9c357..8e948203f1 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3080,7 +3080,7 @@ void TextEdit::set_line(int p_line, const String &p_new_text) {
_remove_text(p_line, 0, p_line, text[p_line].length());
_insert_text(p_line, 0, p_new_text);
if (caret.line == p_line && caret.column > p_new_text.length()) {
- set_caret_column(MIN(caret.column, p_new_text.length()), false);
+ set_caret_column(p_new_text.length(), false);
}
if (has_selection() && p_line == selection.to_line && selection.to_column > text[p_line].length()) {
selection.to_column = text[p_line].length();