Merge pull request #12471 from mhilbrunner/autocomplete

Fix get_node() and $ autocompletion when using single quotes
This commit is contained in:
Rémi Verschelde 2017-10-30 22:22:46 +01:00 committed by GitHub
commit 4889b80698
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 2 deletions

View file

@ -2111,9 +2111,9 @@ Error GDScriptLanguage::complete_code(const String &p_code, const String &p_base
for (List<String>::Element *E = opts.front(); E; E = E->next()) {
String opt = E->get().strip_edges();
if (opt.begins_with("\"") && opt.ends_with("\"")) {
if (opt.is_quoted()) {
r_forced = true;
String idopt = opt.substr(1, opt.length() - 2);
String idopt = opt.unquote();
if (idopt.replace("/", "_").is_valid_identifier()) {
options.insert(idopt);
} else {