diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-08-09 15:32:55 +0400 |
commit | dd75ec490761640571a0d8e53a0d439091f2736f (patch) | |
tree | 25b3966862febbf3ee8c81ed45f7045c99f84016 /source/blender/editors/space_text/text_draw.c | |
parent | 02b0967bd11dd6fd2454b37182d9f94ea451b603 (diff) | |
parent | c026b8066ddc1c42144d2e5132384ea7c1211050 (diff) |
Merged changes in the trunk up to revision 31190.
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index fba2fe89997..926ccc1914a 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -44,8 +44,6 @@ #include "DNA_userdef_types.h" #include "BKE_context.h" -#include "BKE_global.h" -#include "BKE_main.h" #include "BKE_suggestions.h" #include "BKE_text.h" #include "BKE_utildefines.h" @@ -174,12 +172,13 @@ void flatten_string_free(FlattenString *fs) static int find_builtinfunc(char *string) { int a, i; - char builtinfuncs[][11] = {"and", "as", "assert", "break", "class", "continue", "def", + char builtinfuncs[][9] = {"and", "as", "assert", "break", "class", "continue", "def", "del", "elif", "else", "except", "exec", "finally", "for", "from", "global", "if", "import", "in", "is", "lambda", "not", "or", "pass", "print", - "raise", "return", "try", "while", "yield"}; - for(a=0; a<30; a++) { + "raise", "return", "try", "while", "yield", "with"}; + + for(a=0; a < sizeof(builtinfuncs)/sizeof(builtinfuncs[0]); a++) { i = 0; while(1) { /* If we hit the end of a keyword... (eg. "def") */ @@ -1357,7 +1356,7 @@ void text_update_cursor_moved(bContext *C) ARegion *ar; int i, x, winx= 0; - if(!st || !st->text || st->text->curl) return; + if(ELEM3(NULL, st, st->text, st->text->curl)) return; text= st->text; |