diff options
author | Unknown <m.hilbrunner@gmail.com> | 2017-10-28 23:46:20 +0200 |
---|---|---|
committer | mhilbrunner <m.hilbrunner@gmail.com> | 2017-10-30 21:58:32 +0100 |
commit | 7683ff3e42539a24bc333573e271e2ae77eb5c61 (patch) | |
tree | b5cb42d625f0da9b1bf565e85cc08703ef78aa1f /scene/gui | |
parent | c93a3c1bd90c3416048e41328e7d787419828722 (diff) |
Fix get_node() and $ autocompletion when using single quotes
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/text_edit.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index acf6d55eb5..2d55c077f1 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4489,7 +4489,13 @@ void TextEdit::_update_completion_candidates() { completion_index = 0; completion_base = s; Vector<float> sim_cache; + bool single_quote = s.begins_with("'"); + for (int i = 0; i < completion_strings.size(); i++) { + if (single_quote && completion_strings[i].is_quoted()) { + completion_strings[i] = completion_strings[i].unquote().quote("'"); + } + if (s == completion_strings[i]) { // A perfect match, stop completion _cancel_completion(); |