Merge pull request #12471 from mhilbrunner/autocomplete
Fix get_node() and $ autocompletion when using single quotes
This commit is contained in:
commit
4889b80698
4 changed files with 34 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue