summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-10-28 08:08:38 +0100
committerGitHub <noreply@github.com>2019-10-28 08:08:38 +0100
commit0cae264d79d2f835dc763d4831505c47c637acde (patch)
tree371b20c6345fcb0d69051cbd2ad633a5e483e4e2
parenta05d2d20ac42bd4c924375c2f76517394b37e483 (diff)
parent67ab03e24587ed054feeae3de35250ceeacdc768 (diff)
Merge pull request #33119 from creikey/fix-quote-malfunction
Remove duplicate quote in displayed quote type
-rw-r--r--scene/gui/text_edit.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index f30dc3902b..8cf6099279 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -6386,8 +6386,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);
}