diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2016-05-03 21:23:29 +0200 |
---|---|---|
committer | Rémi Verschelde <remi@verschelde.fr> | 2016-05-03 21:23:29 +0200 |
commit | f1b39631f594b28f81b7d3d3162ae9847134464e (patch) | |
tree | 28415a2cbf3bc860136e7a8dc06488613629fbbd | |
parent | 7b834dd788734b38ba0259c740eefce180f76b0e (diff) | |
parent | 084d0bef96068109b67a4bc90e270cd32c678094 (diff) |
Merge pull request #4539 from Paulb23/autocomplete_duplicate_items_issue_1824
Autocomplete no longer shows duplicates, issue #1824
-rw-r--r-- | scene/gui/text_edit.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 41d546c6f7..05f7725a92 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3926,6 +3926,10 @@ void TextEdit::_update_completion_candidates() { int ci_match=0; for(int i=0;i<completion_strings.size();i++) { if (completion_strings[i].begins_with(s)) { + // don't remove duplicates if no input is provided + if (completion_options.find(completion_strings[i]) != -1 && s != "") { + continue; + } completion_options.push_back(completion_strings[i]); int m=0; int max=MIN(completion_current.length(),completion_strings[i].length()); |