From 67ab03e24587ed054feeae3de35250ceeacdc768 Mon Sep 17 00:00:00 2001 From: Cameron Reikes Date: Sun, 27 Oct 2019 15:21:25 -0700 Subject: Remove duplicate quote in displayed quote type - fixes #32688 - fixes #32593 --- scene/gui/text_edit.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'scene') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index ae9c7c88d8..b382142958 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -6360,8 +6360,9 @@ void TextEdit::_confirm_completion() { String line = text[cursor.line]; CharType next_char = line[cursor.column]; CharType last_completion_char = completion_current.insert_text[completion_current.insert_text.length() - 1]; + CharType last_completion_char_display = completion_current.display[completion_current.display.length() - 1]; - if ((last_completion_char == '"' || last_completion_char == '\'') && last_completion_char == next_char) { + if ((last_completion_char == '"' || last_completion_char == '\'') && (last_completion_char == next_char || last_completion_char_display == next_char)) { _remove_text(cursor.line, cursor.column, cursor.line, cursor.column + 1); } -- cgit v1.2.3