aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-07-27 15:28:46 +0000
committerGerd Moellmann2001-07-27 15:28:46 +0000
commitd6c747a4fde7445617a55811b7c584d64b57ff03 (patch)
tree2c4e8ae88c59a8205a675819fc8d96fb6197893c /src
parent98b8a90f65821094abe0701c989628e91a09a751 (diff)
downloademacs-d6c747a4fde7445617a55811b7c584d64b57ff03.tar.gz
emacs-d6c747a4fde7445617a55811b7c584d64b57ff03.zip
(shift_glyph_matrix, blank_row): Fix computation
of row's visible height.
Diffstat (limited to 'src')
-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)
994 struct glyph_row *row = &matrix->rows[start]; 994 struct glyph_row *row = &matrix->rows[start];
995 995
996 row->y += dy; 996 row->y += dy;
997 row->visible_height = row->height;
997 998
998 if (row->y < min_y) 999 if (row->y < min_y)
999 row->visible_height = row->height - (min_y - row->y); 1000 row->visible_height -= min_y - row->y;
1000 else if (row->y + row->height > max_y) 1001 if (row->y + row->height > max_y)
1001 row->visible_height = row->height - (row->y + row->height - max_y); 1002 row->visible_height -= row->y + row->height - max_y;
1002 else
1003 row->visible_height = row->height;
1004 } 1003 }
1005} 1004}
1006 1005
@@ -1154,13 +1153,12 @@ blank_row (w, row, y)
1154 row->y = y; 1153 row->y = y;
1155 row->ascent = row->phys_ascent = 0; 1154 row->ascent = row->phys_ascent = 0;
1156 row->height = row->phys_height = CANON_Y_UNIT (XFRAME (w->frame)); 1155 row->height = row->phys_height = CANON_Y_UNIT (XFRAME (w->frame));
1157 1156 row->visible_height = row->height;
1157
1158 if (row->y < min_y) 1158 if (row->y < min_y)
1159 row->visible_height = row->height - (min_y - row->y); 1159 row->visible_height -= min_y - row->y;
1160 else if (row->y + row->height > max_y) 1160 if (row->y + row->height > max_y)
1161 row->visible_height = row->height - (row->y + row->height - max_y); 1161 row->visible_height -= row->y + row->height - max_y;
1162 else
1163 row->visible_height = row->height;
1164 1162
1165 row->enabled_p = 1; 1163 row->enabled_p = 1;
1166} 1164}