From 74330bb3308fccd1f5fc293b6baface7e33acec5 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 20 Jun 2018 11:05:18 +0200 Subject: [PATCH] [python] Properly compute all token length --- apps/code/python_text_area.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/code/python_text_area.cpp b/apps/code/python_text_area.cpp index b07e0a529..c7e8a2d00 100644 --- a/apps/code/python_text_area.cpp +++ b/apps/code/python_text_area.cpp @@ -48,7 +48,18 @@ static inline int TokenLength(mp_lexer_t * lex) { case MP_TOKEN_OP_LESS_EQUAL: case MP_TOKEN_OP_MORE_EQUAL: case MP_TOKEN_OP_DBL_EQUAL: + case MP_TOKEN_OP_NOT_EQUAL: + case MP_TOKEN_DEL_PLUS_EQUAL: + case MP_TOKEN_DEL_MINUS_EQUAL: + case MP_TOKEN_DEL_STAR_EQUAL: + case MP_TOKEN_DEL_SLASH_EQUAL: + case MP_TOKEN_DEL_PERCENT_EQUAL: + case MP_TOKEN_DEL_AMPERSAND_EQUAL: + case MP_TOKEN_DEL_PIPE_EQUAL: + case MP_TOKEN_DEL_CARET_EQUAL: + case MP_TOKEN_DEL_MINUS_MORE: return 2; + case MP_TOKEN_DEL_DBL_SLASH_EQUAL: case MP_TOKEN_DEL_DBL_MORE_EQUAL: case MP_TOKEN_DEL_DBL_LESS_EQUAL: case MP_TOKEN_DEL_DBL_STAR_EQUAL: