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:
authorCampbell Barton <ideasman42@gmail.com>2015-12-01 09:37:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-12-01 09:56:06 +0300
commit260d2adcf1f09f66f00a7b9fc857f2cbff486b68 (patch)
tree6922d4db08058f6faab7151f5e83e6a202d6762c /source/blender/editors/space_text
parent6783c673e6457399ef2cb0c5ee65fcfe8a1d07f0 (diff)
minor error in recent text-draw commit
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r--source/blender/editors/space_text/text_draw.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c
index a7d27d2099f..0ffd40def90 100644
--- a/source/blender/editors/space_text/text_draw.c
+++ b/source/blender/editors/space_text/text_draw.c
@@ -67,7 +67,7 @@ typedef struct TextDrawContext {
static void text_draw_context_init(const SpaceText *st, TextDrawContext *tdc)
{
tdc->font_id = blf_mono_font;
- tdc->cwidth = st->cwidth;
+ tdc->cwidth = 0;
tdc->lheight_dpi = st->lheight_dpi;
}
@@ -1398,9 +1398,11 @@ void draw_text_main(SpaceText *st, ARegion *ar)
lineno++;
}
+
text_font_begin(&tdc);
- st->cwidth = BLF_fixed_width(tdc.font_id);
- st->cwidth = MAX2(st->cwidth, (char)1);
+
+ tdc.cwidth = max_ii((int)BLF_fixed_width(tdc.font_id), 1);
+ st->cwidth = tdc.cwidth;
/* draw line numbers background */
if (st->showlinenrs) {