summaryrefslogtreecommitdiff
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authoriwek <miwanczuk7@gmail.com>2022-06-02 15:52:09 +0200
committeriwek <miwanczuk7@gmail.com>2022-06-02 15:52:09 +0200
commit848e759d88300c54160418ab8a43d0ca0ffed610 (patch)
treec22a985d42446c2825208e5e85c90580f7beb1a4 /scene/gui/text_edit.cpp
parent8e3084cc91cf9a65f39b81b1187497c82614afe0 (diff)
Remove redundant min call when setting line
Diffstat (limited to 'scene/gui/text_edit.cpp')
-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();