summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-05-01 10:32:41 +0200
committerGitHub <noreply@github.com>2019-05-01 10:32:41 +0200
commitf3eafcec1a2eae021114fa12bd304668b9198af5 (patch)
treed9e5b5c8b36cfecd2c0d5b2315d917e96990e800 /scene/gui
parenta72552367e2d003e886b378a8b932d9b12daae54 (diff)
parent11f4b5efc56c09363ec637068d7c0b038a0a62cb (diff)
Merge pull request #25350 from Connall/master
Fix "Auto Brace Complete" inserting extra quotation character sometimes in a string.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/text_edit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 729d3025c4..ac1cf45315 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1560,8 +1560,7 @@ void TextEdit::_consume_pair_symbol(CharType ch) {
}
if ((ch == '\'' || ch == '"') &&
- cursor_get_column() > 0 &&
- _is_text_char(text[cursor.line][cursor_get_column() - 1])) {
+ cursor_get_column() > 0 && _is_text_char(text[cursor.line][cursor_get_column() - 1]) && !_is_pair_right_symbol(text[cursor.line][cursor_get_column()])) {
insert_text_at_cursor(ch_single);
cursor_set_column(cursor_position_to_move);
return;