summaryrefslogtreecommitdiff
path: root/src/dispnew.c
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2001-07-27 15:28:46 +0000
committerGerd Moellmann <gerd@gnu.org>2001-07-27 15:28:46 +0000
commitf8d1ba1c7c5087f04871f343d94f4c75411fc64e (patch)
treeea329d157dccb4256c18286a1a1c8de144a40ee2 /src/dispnew.c
parentbab29d933393777c434da10b6bdc36adaf913b97 (diff)
downloademacs-f8d1ba1c7c5087f04871f343d94f4c75411fc64e.tar.gz
(shift_glyph_matrix, blank_row): Fix computation
of row's visible height.
Diffstat (limited to 'src/dispnew.c')
-rw-r--r--src/dispnew.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index afef7909a80..5e16897b93f 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -994,13 +994,12 @@ shift_glyph_matrix (w, matrix, start, end, dy)
struct glyph_row *row = &matrix->rows[start];
row->y += dy;
+ row->visible_height = row->height;
if (row->y < min_y)
- row->visible_height = row->height - (min_y - row->y);
- else if (row->y + row->height > max_y)
- row->visible_height = row->height - (row->y + row->height - max_y);
- else
- row->visible_height = row->height;
+ row->visible_height -= min_y - row->y;
+ if (row->y + row->height > max_y)
+ row->visible_height -= row->y + row->height - max_y;
}
}
@@ -1154,13 +1153,12 @@ blank_row (w, row, y)
row->y = y;
row->ascent = row->phys_ascent = 0;
row->height = row->phys_height = CANON_Y_UNIT (XFRAME (w->frame));
-
+ row->visible_height = row->height;
+
if (row->y < min_y)
- row->visible_height = row->height - (min_y - row->y);
- else if (row->y + row->height > max_y)
- row->visible_height = row->height - (row->y + row->height - max_y);
- else
- row->visible_height = row->height;
+ row->visible_height -= min_y - row->y;
+ if (row->y + row->height > max_y)
+ row->visible_height -= row->y + row->height - max_y;
row->enabled_p = 1;
}