mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Autocomplete only after edition
Reverts 39c3d66cd
This commit is contained in:
@@ -245,8 +245,11 @@ bool PythonTextArea::handleEvent(Ion::Events::Event event) {
|
||||
}
|
||||
}
|
||||
bool result = TextArea::handleEvent(event);
|
||||
if (!m_contentView.isAutocompleting() && selectionIsEmpty()) {
|
||||
// Add autocompletion after each event handled, if nothing is selected
|
||||
if (event == Ion::Events::Backspace && !m_contentView.isAutocompleting() && selectionIsEmpty()) {
|
||||
/* We want to add autocompletion when we are editing a word (after adding or
|
||||
* deleting text). So if nothing is selected, we add the autocompletion if
|
||||
* the event is backspace, as autocompletion has already been added if the
|
||||
* event added text, in handleEventWithText. */
|
||||
addAutocompletion();
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user