summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorjonyrock <ilms@live.ru>2014-05-07 15:38:07 +0400
committerjonyrock <ilms@live.ru>2014-05-07 15:38:07 +0400
commit0121d96288397c32ef9e3024a5866a25f7d440c5 (patch)
treefd22988aa006c680f0c3d89b8b291d66070f43c7 /scene
parentc69c99f8be157b3cea73751a548dcb4862f3314f (diff)
call during autocompletion
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp9
1 files changed, 8 insertions, 1 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();