Fix off-by-one error on the backward iteration loop, that was causing the

Wed Jan 15 17:02:18 2003  Owen Taylor  <otaylor@redhat.com>

        * gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
        Fix off-by-one error on the backward iteration loop,
        that was causing the wrong range to be redrawn.
        (at least part of #72734)
This commit is contained in:
Owen Taylor 2003-01-21 22:48:33 +00:00 committed by Owen Taylor
parent 2294c892e7
commit e435fc1fd1
6 changed files with 38 additions and 2 deletions

View File

@ -1,3 +1,10 @@
Wed Jan 15 17:02:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Fix off-by-one error on the backward iteration loop,
that was causing the wrong range to be redrawn.
(at least part of #72734)
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (gtk_text_view_size_allocate): Adjust the

View File

@ -1,3 +1,10 @@
Wed Jan 15 17:02:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Fix off-by-one error on the backward iteration loop,
that was causing the wrong range to be redrawn.
(at least part of #72734)
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (gtk_text_view_size_allocate): Adjust the

View File

@ -1,3 +1,10 @@
Wed Jan 15 17:02:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Fix off-by-one error on the backward iteration loop,
that was causing the wrong range to be redrawn.
(at least part of #72734)
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (gtk_text_view_size_allocate): Adjust the

View File

@ -1,3 +1,10 @@
Wed Jan 15 17:02:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Fix off-by-one error on the backward iteration loop,
that was causing the wrong range to be redrawn.
(at least part of #72734)
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (gtk_text_view_size_allocate): Adjust the

View File

@ -1,3 +1,10 @@
Wed Jan 15 17:02:18 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextlayout.c (gtk_text_layout_validate_yrange):
Fix off-by-one error on the backward iteration loop,
that was causing the wrong range to be redrawn.
(at least part of #72734)
2003-01-21 Matthias Clasen <maclas@gmx.de>
* gtk/gtktextview.c (gtk_text_view_size_allocate): Adjust the

View File

@ -812,6 +812,7 @@ gtk_text_layout_validate_yrange (GtkTextLayout *layout,
/* Validate backwards from the anchor line to y0
*/
line = _gtk_text_iter_get_text_line (anchor);
line = _gtk_text_line_previous (line);
seen = 0;
while (line && seen < -y0)
{
@ -827,11 +828,11 @@ gtk_text_layout_validate_yrange (GtkTextLayout *layout,
delta_height += line_data->height - old_height;
first_line = line;
first_line_y = -seen;
first_line_y = -seen - line_data->height;
if (!last_line)
{
last_line = line;
last_line_y = -seen + line_data->height;
last_line_y = -seen;
}
}