From 2b64f73b0459190d20b2f6de39275ee7979317c4 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 27 Jun 2015 15:52:39 -0300 Subject: 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. --- scene/gui/text_edit.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'scene/gui/text_edit.cpp') 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 { -- cgit v1.2.3