summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-06-27 15:52:39 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-06-27 15:52:39 -0300
commit2b64f73b0459190d20b2f6de39275ee7979317c4 (patch)
treec601222ba20cacc80fba7ff43b5de425db13519c /scene
parenta67486a39ee629acac068a6d014015944cf83bb3 (diff)
more code completion improvements
-calltip dissapears with more types of keypresses or when pressing ')' -properly looks into autoloaded scripts or nodes with another script for script functions/variables/etc.
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 44e97b5889..1759f3eb04 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -1842,6 +1842,8 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (k.mod.shift)
_post_shift_selection();
+ _cancel_completion();
+ completion_hint="";
} break;
case KEY_END: {
@@ -1855,6 +1857,9 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (k.mod.shift)
_post_shift_selection();
+
+ _cancel_completion();
+ completion_hint="";
} break;
#endif
@@ -1867,6 +1872,10 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (k.mod.shift)
_post_shift_selection();
+
+ _cancel_completion();
+ completion_hint="";
+
} break;
case KEY_PAGEDOWN: {
@@ -1878,6 +1887,10 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
if (k.mod.shift)
_post_shift_selection();
+
+ _cancel_completion();
+ completion_hint="";
+
} break;
case KEY_A: {
@@ -2064,6 +2077,9 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
const CharType chr[2] = {(CharType)k.unicode, 0};
+ if (completion_hint!="" && k.unicode==')') {
+ completion_hint="";
+ }
if(auto_brace_completion_enabled && _is_pair_symbol(chr[0])) {
_consume_pair_symbol(chr[0]);
} else {