Merge pull request #26642 from DrMoriarty/check_cursor_line

Check cursor line and column
This commit is contained in:
Rémi Verschelde 2019-03-05 22:57:55 +01:00 committed by GitHub
commit 4ab4ff67ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -666,7 +666,7 @@ void TextEdit::_notification(int p_what) {
bool brace_close_matching = false;
bool brace_close_mismatch = false;
if (brace_matching_enabled) {
if (brace_matching_enabled && cursor.line >= 0 && cursor.line < text.size() && cursor.column >= 0) {
if (cursor.column < text[cursor.line].length()) {
//check for open