summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-10-30 22:22:46 +0100
committerGitHub <noreply@github.com>2017-10-30 22:22:46 +0100
commit4889b806984ce454f906f066c8b3f63c7efa401e (patch)
treee63480d73c93a933f1c83903b6041743d07e964d /modules
parent6a11e8c3773d27f1a7531b16324edbf1c803ed43 (diff)
parent7683ff3e42539a24bc333573e271e2ae77eb5c61 (diff)
Merge pull request #12471 from mhilbrunner/autocomplete
Fix get_node() and $ autocompletion when using single quotes
Diffstat (limited to 'modules')
-rw-r--r--modules/gdscript/gd_editor.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp
index bcb998aee0..d9b10ff3fa 100644
--- a/modules/gdscript/gd_editor.cpp
+++ b/modules/gdscript/gd_editor.cpp
@@ -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 {