diff options
author | Anthony Eriksson <Kony> | 2019-10-03 03:24:24 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-10-03 04:11:55 +0300 |
commit | 4ccf02764ca6501b59d87a916a847ed5637e4e7d (patch) | |
tree | 59de9c9f4c405ef550fce536dfebb5776ecc4b41 /source/blender/editors | |
parent | 540eb2dc1e57e649483fb66c7034bded85c8f54e (diff) |
Fix T69216: "assert" not highlighted in text editor
Workaround limitations of formatting code by putting longest names first.
Differential Revision: https://developer.blender.org/D5613
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_text/text_format_py.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_format_py.c b/source/blender/editors/space_text/text_format_py.c index 98eeee61c3a..75dd003c557 100644 --- a/source/blender/editors/space_text/text_format_py.c +++ b/source/blender/editors/space_text/text_format_py.c @@ -58,11 +58,11 @@ static int txtfmt_py_find_builtinfunc(const char *string) /* Keep aligned args for readability. */ /* clang-format off */ - if (STR_LITERAL_STARTSWITH(string, "and", len)) { i = len; - } else if (STR_LITERAL_STARTSWITH(string, "as", len)) { i = len; - } else if (STR_LITERAL_STARTSWITH(string, "assert", len)) { i = len; + if (STR_LITERAL_STARTSWITH(string, "assert", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "async", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "await", len)) { i = len; + } else if (STR_LITERAL_STARTSWITH(string, "and", len)) { i = len; + } else if (STR_LITERAL_STARTSWITH(string, "as", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "break", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "continue", len)) { i = len; } else if (STR_LITERAL_STARTSWITH(string, "del", len)) { i = len; |