From 4d3f0cb8c1e7a47dda400727dea8657fb74265d8 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 20 Dec 2012 16:37:07 +0000 Subject: Better cursor centering for text editor --- source/blender/editors/space_text/text_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_text') diff --git a/source/blender/editors/space_text/text_draw.c b/source/blender/editors/space_text/text_draw.c index 8e247911597..7d4c9e5af98 100644 --- a/source/blender/editors/space_text/text_draw.c +++ b/source/blender/editors/space_text/text_draw.c @@ -1045,7 +1045,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar) UI_ThemeColor(TH_SHADE2); x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; - y = ar->winy - 2; + y = ar->winy; if (vcurl == vsell) { y -= vcurl * lheight; @@ -1120,7 +1120,7 @@ static void draw_cursor(SpaceText *st, ARegion *ar) /* Draw the cursor itself (we draw the sel. cursor as this is the leading edge) */ x = st->showlinenrs ? TXT_OFFSET + TEXTXLOC : TXT_OFFSET; x += vselc * st->cwidth; - y = ar->winy - 2 - vsell * lheight; + y = ar->winy - vsell * lheight; if (st->overwrite) { char ch = text->sell->line[text->selc]; -- cgit v1.2.3