Commit: 4ccf02764ca6501b59d87a916a847ed5637e4e7d
Author: Anthony Eriksson
Date:   Thu Oct 3 02:24:24 2019 +0200
Branches: master
https://developer.blender.org/rB4ccf02764ca6501b59d87a916a847ed5637e4e7d

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

===================================================================

M       source/blender/editors/space_text/text_format_py.c

===================================================================

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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to