summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/gui/text_edit.cpp9
-rw-r--r--tools/editor/code_editor.cpp2
2 files changed, 9 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 2ac9c66771..fcbef9e891 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1123,6 +1123,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (k.scancode==KEY_SHIFT) {
+ print_line("accent shift and return");
accept_event();
return;
}
@@ -1132,11 +1133,17 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (cursor.column<text[cursor.line].length() && text[cursor.line][cursor.column]==k.unicode) {
//same char, move ahead
cursor_set_column(cursor.column+1);
+
} else {
//different char, go back
const CharType chr[2] = {k.unicode, 0};
- _insert_text_at_cursor(chr);
+ if(auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
+ _consume_pair_symbol(chr[0]);
+ } else {
+ _insert_text_at_cursor(chr);
+ }
}
+
_update_completion_candidates();
accept_event();
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 994e3e1e68..7e6a7a30b8 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -492,7 +492,7 @@ void CodeTextEditor::_complete_request(const String& p_request, int p_line) {
List<String> entries;
_code_complete_script(text_editor->get_text(),p_request,p_line,&entries);
- print_line("COMPLETE: "+p_request);
+ // print_line("COMPLETE: "+p_request);
Vector<String> strs;
strs.resize(entries.size());
int i=0;