fix crash in editor when using alt+arrows to indent, thanks adolson and romulox_x

This commit is contained in:
Juan Linietsky
2015-05-05 00:17:22 -03:00
parent cb93e064a9
commit 74b0e0c296
2 changed files with 15 additions and 12 deletions

View File

@ -3494,6 +3494,9 @@ void TextEdit::set_line(int line, String new_text)
return;
_remove_text(line, 0, line, text[line].length());
_insert_text(line, 0, new_text);
if (cursor.line==line) {
cursor.column=MIN(cursor.column,new_text.length());
}
}
void TextEdit::insert_at(const String &p_text, int at)