[apps/code] Autocomplete when cursor at the end of the word

Not just after adding or deleting text
This commit is contained in:
Léa Saviot
2020-04-10 17:35:39 +02:00
committed by Émilie Feral
parent 03471bb7b4
commit b41d1e393e

View File

@@ -236,7 +236,8 @@ bool PythonTextArea::handleEvent(Ion::Events::Event event) {
}
}
bool result = TextArea::handleEvent(event);
if (event == Ion::Events::Backspace) {
if (!m_contentView.isAutocompleting() && selectionIsEmpty()) {
// Add autocompletion after each event handled, if nothing is selected
addAutocompletion();
}
return result;