mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Fix assertion
This commit is contained in:
@@ -259,8 +259,10 @@ void PythonTextArea::removeAutocompletion() {
|
||||
assert(m_contentView.isAutocompleting());
|
||||
const char * autocompleteStart = m_contentView.cursorLocation();
|
||||
const char * autocompleteEnd = UTF8Helper::EndOfWord(autocompleteStart);
|
||||
assert(autocompleteEnd > autocompleteStart);
|
||||
m_contentView.removeText(autocompleteStart, autocompleteEnd);
|
||||
assert(autocompleteEnd >= autocompleteStart);
|
||||
if (autocompleteEnd > autocompleteStart) {
|
||||
m_contentView.removeText(autocompleteStart, autocompleteEnd);
|
||||
}
|
||||
m_contentView.setAutocompleting(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user