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_python.c')
-rw-r--r--source/blender/editors/space_text/text_python.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_python.c b/source/blender/editors/space_text/text_python.c
index 4fa54cdf27b..b606f8cb141 100644
--- a/source/blender/editors/space_text/text_python.c
+++ b/source/blender/editors/space_text/text_python.c
@@ -66,16 +66,18 @@ int text_do_suggest_select(SpaceText *st, ARegion *ar)
/* Count the visible lines to the cursor */
for(tmp=st->text->curl, l=-st->top; tmp; tmp=tmp->prev, l++);
if(l<0) return 0;
+
+ text_update_character_width(st);
if(st->showlinenrs) {
- x = text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
+ x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET + TEXTXLOC - 4;
}
else {
- x = text_font_width_character(st)*(st->text->curc-st->left) + TXT_OFFSET - 4;
+ x = st->cwidth*(st->text->curc-st->left) + TXT_OFFSET - 4;
}
y = ar->winy - st->lheight*l - 2;
- w = SUGG_LIST_WIDTH*text_font_width_character(st) + 20;
+ w = SUGG_LIST_WIDTH*st->cwidth + 20;
h = SUGG_LIST_SIZE*st->lheight + 8;
// XXX getmouseco_areawin(mval);