diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-05-05 00:17:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-05-05 00:17:22 -0300 |
commit | 74b0e0c296ac438df2f0826482310e788d0ba898 (patch) | |
tree | 4e834e8c3dfe2fed89f57cbf2f9353e07ca900a8 /scene/gui | |
parent | cb93e064a9378af3b8a31cae43aa55f3cd4168f2 (diff) |
fix crash in editor when using alt+arrows to indent, thanks adolson and romulox_x
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 75174a85de..681c33652e 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -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) |