Merge pull request #61631 from iwek7/redundant_min_call

This commit is contained in:
Rémi Verschelde 2022-06-02 18:20:45 +02:00 committed by GitHub
commit 52e36ab80e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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