From f49bf76b1912c189020a4221d61714aa59bfa753 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Tue, 28 Apr 2020 09:46:08 +0200 Subject: [PATCH] [apps/code] More complete comment --- apps/code/python_text_area.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/code/python_text_area.cpp b/apps/code/python_text_area.cpp index 6c39de566..a5c92b017 100644 --- a/apps/code/python_text_area.cpp +++ b/apps/code/python_text_area.cpp @@ -94,7 +94,10 @@ PythonTextArea::AutocompletionType PythonTextArea::autocompletionType(const char /* If autocompleteType is already EndOfIdentifier, we are * autocompleting, so we do not need to update autocompleteType. If we * recomputed autocompleteType now, we might wrongly think that it is - * MiddleOfIdentifier because of the autocompetion text. */ + * MiddleOfIdentifier because of the autocompetion text. + * Example : fin|ally -> the lexer is at the end of "fin", but because + * we are autocompleting with "ally", the lexer thinks the cursor is + * in the middle of an identifier. */ if (autocompleteType != AutocompletionType::EndOfIdentifier) { autocompleteType = location < tokenEnd ? AutocompletionType::MiddleOfIdentifier : AutocompletionType::EndOfIdentifier; }