diff options
author | Connall Lindsay <connall@terminal-control.com> | 2019-01-26 16:35:26 +0000 |
---|---|---|
committer | Connall Lindsay <connall@terminal-control.com> | 2019-01-26 17:03:11 +0000 |
commit | 11f4b5efc56c09363ec637068d7c0b038a0a62cb (patch) | |
tree | 4938b3ffad64b5744fa6003d3eddf393c1ce2f09 /scene | |
parent | a8510331c0115eeee2d6ac0a4acbeb5d4df833b3 (diff) |
Brace completion for quotation marks was introducing another quotation mark at the end of the
string, I think because it wasn't checking that the quotation mark didn't exist at the current
cursors position. Simple change, that fixed the issue and stood up to testing. Issue #25084
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/text_edit.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 09fbb39866..3da6d0085a 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -1494,8 +1494,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; |