[apps/code] Autocompletion for "abs" proposes parentheses

This commit is contained in:
Léa Saviot
2020-05-05 17:26:00 +02:00
committed by Émilie Feral
parent b070eaad45
commit 780c593c26
2 changed files with 22 additions and 16 deletions

View File

@@ -522,7 +522,7 @@ void VariableBoxController::loadBuiltinNodes(const char * textToAutocomplete, in
bool strictlyStartsWith = false;
startsWith = NodeNameCompare(&node, textToAutocomplete, textToAutocompleteLength, &strictlyStartsWith);
if (startsWith == 0) { // The node name and name are equal
startsWith = builtinNames[i].type == ScriptNode::Type::WithParentheses ? 0 : -1; // We accept the node only if it has parentheses
startsWith = node.type() == ScriptNode::Type::WithParentheses ? 0 : -1; // We accept the node only if it has parentheses
} else if (strictlyStartsWith) {
startsWith = 0;
} else if (startsWith > 0) {