[apps/code] Fix assertion

This commit is contained in:
Léa Saviot
2020-03-13 16:45:57 +01:00
committed by Émilie Feral
parent 5dd4f12ee3
commit a2cc923a02

View File

@@ -164,8 +164,8 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
// Redraw the autocompleted word in the right color
const char * autocompleteStart = m_cursorLocation;
assert(autocompleteStart != text);
if (m_autocomplete && autocompleteStart > text && autocompleteStart < text + byteLength) {
assert(!m_autocomplete || autocompleteStart != text);
if (m_autocomplete && autocompleteStart > text && autocompleteStart < text + byteLength) {
const char * autocompleteEnd = UTF8Helper::EndOfWord(autocompleteStart);
drawStringAt(
ctx,