summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorKanabenki <18357657+Kanabenki@users.noreply.github.com>2018-11-26 16:36:46 +0100
committerKanabenki <18357657+Kanabenki@users.noreply.github.com>2018-11-26 16:36:46 +0100
commit99ffd748f1f33bf8ff433d8510f3683c8f4e6737 (patch)
tree3acd57367354de3d2342bbcc63494b17bdf7f6c6 /scene
parent942855a9ee376ce6ee30a25674856ba64316b548 (diff)
Add suggestions ignoring case at the end of the code autocomplete
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/text_edit.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 5fe6fcdfac..51d707c28f 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -5758,6 +5758,7 @@ void TextEdit::_update_completion_candidates() {
completion_base = s;
Vector<float> sim_cache;
bool single_quote = s.begins_with("'");
+ Vector<String> completion_options_casei;
for (int i = 0; i < completion_strings.size(); i++) {
if (single_quote && completion_strings[i].is_quoted()) {
@@ -5766,9 +5767,13 @@ void TextEdit::_update_completion_candidates() {
if (completion_strings[i].begins_with(s)) {
completion_options.push_back(completion_strings[i]);
+ } else if (completion_strings[i].to_lower().begins_with(s.to_lower())) {
+ completion_options_casei.push_back(completion_strings[i]);
}
}
+ completion_options.append_array(completion_options_casei);
+
if (completion_options.size() == 0) {
for (int i = 0; i < completion_strings.size(); i++) {
if (s.is_subsequence_of(completion_strings[i])) {