summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-03-05 22:57:55 +0100
committerGitHub <noreply@github.com>2019-03-05 22:57:55 +0100
commit4ab4ff67ffb5bbf1ea0932c6a0b0353a77622bc3 (patch)
treeff29df92c5b96aa5d5123d55c5ca42971c41219c /scene/gui
parent2e79ec973f7e28de7ed550fe74f170c92d9dc298 (diff)
parenta3d9b7d9162259c26d01ce659b49119751a5195a (diff)
Merge pull request #26642 from DrMoriarty/check_cursor_line
Check cursor line and column
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f38bc62a3c..2bf2364873 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -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