From 06f77b4aab08dfb27c497556ed340f7883060071 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Wed, 21 Jun 2000 07:18:28 +0000 Subject: Fixed some vertical scroll bugs. 2000-06-21 Christopher James Lahey * widgets/e-text/e-text.c: Fixed some vertical scroll bugs. svn path=/trunk/; revision=3673 --- widgets/e-text/e-text.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'widgets/e-text') diff --git a/widgets/e-text/e-text.c b/widgets/e-text/e-text.c index 614c87af97..6b371e0ba3 100644 --- a/widgets/e-text/e-text.c +++ b/widgets/e-text/e-text.c @@ -1388,11 +1388,11 @@ e_text_reflow (GnomeCanvasItem *item, int flags) text->xofs_edit = 2 + x - text->clip_width; } - if ((text->font->ascent + text->font->descent) * (i - 1) < text->yofs_edit) - text->yofs_edit = (text->font->ascent + text->font->descent) * (i - 1); + if ((text->font->ascent + text->font->descent) * i < text->yofs_edit) + text->yofs_edit = (text->font->ascent + text->font->descent) * i; - if (2 + (text->font->ascent + text->font->descent) * i - text->clip_height > text->yofs_edit) - text->yofs_edit = 2 + (text->font->ascent + text->font->descent) * i - text->clip_height; + if ((text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height) > text->yofs_edit) + text->yofs_edit = (text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height); } if ( text->needs_calc_height ) { calc_height (text); @@ -2871,11 +2871,11 @@ e_text_command(ETextEventProcessor *tep, ETextEventProcessorCommand *command, gp text->xofs_edit = 2 + x - text->clip_width; } - if ((text->font->ascent + text->font->descent) * (i - 1) < text->yofs_edit) - text->yofs_edit = (text->font->ascent + text->font->descent) * (i - 1); + if ((text->font->ascent + text->font->descent) * i < text->yofs_edit) + text->yofs_edit = (text->font->ascent + text->font->descent) * i; - if (2 + (text->font->ascent + text->font->descent) * i - text->clip_height > text->yofs_edit) - text->yofs_edit = 2 + (text->font->ascent + text->font->descent) * i - text->clip_height; + if ((text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height) > text->yofs_edit) + text->yofs_edit = (text->font->ascent + text->font->descent) * (i + 1) - (text->clip_height != -1 ? text->clip_height : text->height); } text->needs_redraw = 1; -- cgit v1.2.3