diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 15:30:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-12-03 15:30:59 +0300 |
commit | cd972535027a73ba70069051fe9038b6a8b5696a (patch) | |
tree | b50696bddbc710192b89e34fcdd1e82e6c8073b7 /source/blender/editors/space_text/text_draw.c | |
parent | aca76ddb502cbf0ee7888c3356f9f35240919410 (diff) |
- added GCC warning -Wstrict-prototypes
- fixed bug in paste material, exposed by stricter warnings.
- removed/renamed various shadowed vars.
- removed BGE lamp.colour, only allow lamp.color attribute.
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 3b0d8bb7a29..c5037d1226f 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1418,7 +1418,7 @@ static void draw_suggestion_list(SpaceText *st, ARegion *ar) UI_ThemeColor(TH_SHADE2); glRecti(x+16, y-3, x+16+w, y+st->lheight-3); } - b=1; /* b=1 colour block, text is default. b=0 no block, colour text */ + b=1; /* b=1 color block, text is default. b=0 no block, color text */ switch (item->type) { case 'k': UI_ThemeColor(TH_SYNTAX_B); b=0; break; case 'm': UI_ThemeColor(TH_TEXT); break; @@ -1442,10 +1442,11 @@ static void draw_cursor(SpaceText *st, ARegion *ar) { Text *text= st->text; int vcurl, vcurc, vsell, vselc, hidden=0; - int offl, offc, x, y, w, i; + int x, y, w, i; /* Draw the selection */ if(text->curl!=text->sell || text->curc!=text->selc) { + int offl, offc; /* Convert all to view space character coordinates */ wrap_offset(st, ar, text->curl, text->curc, &offl, &offc); vcurl = txt_get_span(text->lines.first, text->curl) - st->top + offl; @@ -1489,6 +1490,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar) } } else { + int offl, offc; wrap_offset(st, ar, text->sell, text->selc, &offl, &offc); vsell = txt_get_span(text->lines.first, text->sell) - st->top + offl; vselc = text_get_char_pos(st, text->sell->line, text->selc) - st->left + offc; |