[apps/code] Display empty message in var box

This commit is contained in:
Léa Saviot
2020-04-20 13:59:07 +02:00
committed by Émilie Feral
parent 398de8bda3
commit 003317647e
6 changed files with 15 additions and 7 deletions

View File

@@ -124,8 +124,10 @@ bool EditorController::textAreaDidReceiveEvent(TextArea * textArea, Ion::Events:
VariableBoxController * EditorController::variableBoxForInputEventHandler(InputEventHandler * textInput) {
VariableBoxController * varBox = App::app()->variableBoxController();
// If the editor is autocompleting, the variable box has already been loaded
if (!m_editorView.isAutocompleting()) {
/* If the editor should be autocompleting, the variable box has already been
* loaded. We check shouldAutocomplete and not isAutocompleting, because the
* autocompletion result might be empty. */
if (!m_editorView.shouldAutocomplete()) {
varBox->loadFunctionsAndVariables(m_scriptIndex, nullptr, 0);
}
return varBox;