mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Use variable
This commit is contained in:
@@ -360,7 +360,7 @@ void PythonTextArea::addAutocompletion() {
|
||||
const char * parentheses = ScriptNodeCell::k_parentheses;
|
||||
constexpr int parenthesesLength = 2;
|
||||
assert(strlen(parentheses) == parenthesesLength);
|
||||
if (addParentheses && m_contentView.insertTextAtLocation(ScriptNodeCell::k_parentheses, const_cast<char *>(autocompletionLocation), parenthesesLength)) {
|
||||
if (addParentheses && m_contentView.insertTextAtLocation(parentheses, const_cast<char *>(autocompletionLocation), parenthesesLength)) {
|
||||
m_contentView.setAutocompleting(true);
|
||||
m_contentView.setAutocompletionEnd(autocompletionLocation + parenthesesLength);
|
||||
}
|
||||
|
||||
@@ -742,7 +742,7 @@ bool VariableBoxController::addNodesFromImportMaybe(mp_parse_node_struct_t * par
|
||||
* and "....function". */
|
||||
constexpr int numberOfNodesToSkip = 3;
|
||||
assert(numberOfChildren > numberOfNodesToSkip);
|
||||
for (int i = 3; i < numberOfChildren; i++) {
|
||||
for (int i = numberOfNodesToSkip; i < numberOfChildren; i++) {
|
||||
const char * name = I18n::translate((moduleChildren + i)->label());
|
||||
checkAndAddNode(textToAutocomplete, textToAutocompleteLength, ScriptNode::Type::WithoutParentheses, NodeOrigin::Importation, name, -1, importationSourceName, I18n::translate((moduleChildren + i)->text()) /*TODO LEA text or label?*/);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user