[ion/utf8_helper] EndOfWord helper

This commit is contained in:
Léa Saviot
2020-03-13 16:00:33 +01:00
committed by Émilie Feral
parent 32fbea9d06
commit 343d2328b8
4 changed files with 27 additions and 4 deletions

View File

@@ -166,10 +166,7 @@ void PythonTextArea::ContentView::drawLine(KDContext * ctx, int line, const char
const char * autocompleteStart = m_cursorLocation;
assert(autocompleteStart != text);
if (m_autocomplete && autocompleteStart > text && autocompleteStart < text + byteLength) {
const char * autocompleteEnd = cursorLocation();
while (*autocompleteEnd != ' ' && autocompleteEnd < text + byteLength) {
autocompleteEnd++;
}
const char * autocompleteEnd = UTF8Helper::EndOfWord(autocompleteStart);
drawStringAt(
ctx,
line,