diff options
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_draw.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_text/text_python.c | 2 |
3 files changed, 6 insertions, 4 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; diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h index c229e685aba..3bfc1aa12da 100644 --- a/source/blender/editors/space_text/text_intern.h +++ b/source/blender/editors/space_text/text_intern.h @@ -99,7 +99,7 @@ void text_free_caches(struct SpaceText *st); int text_file_modified(struct Text *text); int text_do_suggest_select(struct SpaceText *st, struct ARegion *ar); -void text_pop_suggest_list(); +void text_pop_suggest_list(void); int text_get_visible_lines(struct SpaceText *st, struct ARegion *ar, char *str); int text_get_span_wrap(struct SpaceText *st, struct ARegion *ar, struct TextLine *from, struct TextLine *to); diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c index 720e80ec162..1c75e6f65ca 100644 --- a/source/blender/editors/space_text/text_python.c +++ b/source/blender/editors/space_text/text_python.c @@ -388,7 +388,7 @@ short do_textmarkers(SpaceText *st, char ascii, unsigned short evnt, short val) /* Find the next temporary marker */ if(evnt==TABKEY) { int lineno= txt_get_span(text->lines.first, text->curl); - TextMarker *mrk= text->markers.first; + mrk= text->markers.first; while(mrk) { if(!marker && (mrk->flags & TMARK_TEMP)) marker= mrk; if((mrk->flags & TMARK_TEMP) && (mrk->lineno > lineno || (mrk->lineno==lineno && mrk->end > text->curc))) { |