[apps/code] Load builtins according to autocompleted text

This commit is contained in:
Léa Saviot
2020-03-26 15:04:38 +01:00
committed by Émilie Feral
parent 1599b16e03
commit f412d95584
8 changed files with 186 additions and 131 deletions

View File

@@ -124,7 +124,9 @@ bool EditorController::textAreaDidReceiveEvent(TextArea * textArea, Ion::Events:
VariableBoxController * EditorController::variableBoxForInputEventHandler(InputEventHandler * textInput) {
VariableBoxController * varBox = App::app()->variableBoxController();
varBox->loadFunctionsAndVariables(m_scriptIndex, m_editorView.textToAutocomplete());
int length = 0;
const char * text = m_editorView.textToAutocomplete(&length);
varBox->loadFunctionsAndVariables(m_scriptIndex, text, length);
return varBox;
}