Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_text/text_draw.c')
-rw-r--r--source/blender/editors/space_text/text_draw.c6
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;