Remove redundant min call when setting line

This commit is contained in:
iwek 2022-06-02 15:52:09 +02:00
parent 8e3084cc91
commit 848e759d88

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