aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-text/e-text.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-text/e-text.c')
-rw-r--r--widgets/e-text/e-text.c16
1 files changed, 8 insertions, 8 deletions
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;