+ /* Extend top-aligned top indicator (or bottom-aligned bottom
+ indicator) to adjacent rows if it doesn't fit in one row. */
+ top_ind_min_y = bot_ind_max_y = -1;
+ if (top_ind_rn >= 0)
+ {
+ int bn = NO_FRINGE_BITMAP;
+
+ row = w->desired_matrix->rows + top_ind_rn;
+ if (!row->enabled_p)
+ row = w->current_matrix->rows + top_ind_rn;
+
+ top_row_ends_at_zv_p = row->ends_at_zv_p;
+ if (row->indicate_bob_p)
+ {
+ if (EQ (boundary_top, Qleft))
+ bn = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
+ ? LEFT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p)
+ : LEFT_FRINGE (2, Qtop, 0));
+ else
+ bn = ((row->indicate_eob_p && EQ (boundary_bot, Qright))
+ ? RIGHT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p)
+ : RIGHT_FRINGE (2, Qtop, 0));
+ }
+ else if (row->indicate_top_line_p)
+ {
+ if (EQ (arrow_top, Qleft))
+ bn = LEFT_FRINGE (6, Qup, 0);
+ else
+ bn = RIGHT_FRINGE (6, Qup, 0);
+ }
+
+ if (bn != NO_FRINGE_BITMAP)
+ {
+ struct fringe_bitmap *fb = get_fringe_bitmap_data (bn);
+
+ if (fb->align == ALIGN_BITMAP_TOP && fb->period == 0)
+ {
+ struct glyph_row *row1;
+ int top_ind_max_y;
+
+ top_ind_min_y = WINDOW_HEADER_LINE_HEIGHT (w);
+ top_ind_max_y = top_ind_min_y + fb->height;
+ if (top_ind_max_y > yb)
+ top_ind_max_y = yb;
+
+ for (y = row->y + row->height, rn = top_ind_rn + 1;
+ y < top_ind_max_y && rn < nrows;
+ y += row1->height, rn++)
+ {
+ if (bot_ind_rn >= 0 && rn >= bot_ind_rn)
+ break;
+
+ row1 = w->desired_matrix->rows + rn;
+ if (!row1->enabled_p)
+ row1 = w->current_matrix->rows + rn;
+
+ row1->indicate_bob_p = row->indicate_bob_p;
+ row1->indicate_top_line_p = row->indicate_top_line_p;
+ }
+ }
+ }
+ }
+ if (bot_ind_rn >= 0)
+ {
+ int bn = NO_FRINGE_BITMAP;
+
+ row = w->desired_matrix->rows + bot_ind_rn;
+ if (!row->enabled_p)
+ row = w->current_matrix->rows + bot_ind_rn;
+
+ bot_row_ends_at_zv_p = row->ends_at_zv_p;
+ if (row->indicate_eob_p)
+ {
+ if (EQ (boundary_bot, Qleft))
+ bn = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p);
+ else
+ bn = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p);
+ }
+ else if (row->indicate_bottom_line_p)
+ {
+ if (EQ (arrow_bot, Qleft))
+ bn = LEFT_FRINGE (7, Qdown, 0);
+ else
+ bn = RIGHT_FRINGE (7, Qdown, 0);
+ }
+
+ if (bn != NO_FRINGE_BITMAP)
+ {
+ struct fringe_bitmap *fb = get_fringe_bitmap_data (bn);
+
+ if (fb->align == ALIGN_BITMAP_BOTTOM && fb->period == 0)
+ {
+ struct glyph_row *row1;
+ int bot_ind_min_y;
+
+ bot_ind_max_y = row->y + row->visible_height;
+ bot_ind_min_y = bot_ind_max_y - fb->height;
+ if (bot_ind_min_y < WINDOW_HEADER_LINE_HEIGHT (w))
+ bot_ind_min_y = WINDOW_HEADER_LINE_HEIGHT (w);
+
+ for (y = row->y, rn = bot_ind_rn - 1;
+ y >= bot_ind_min_y && rn >= 0;
+ y -= row1->height, rn--)
+ {
+ if (top_ind_rn >= 0 && rn <= top_ind_rn)
+ break;
+
+ row1 = w->desired_matrix->rows + rn;
+ if (!row1->enabled_p)
+ row1 = w->current_matrix->rows + rn;
+
+ row1->indicate_eob_p = row->indicate_eob_p;
+ row1->indicate_bottom_line_p = row->indicate_bottom_line_p;
+ }
+ }
+ }
+ }
+
+ for (y = w->vscroll, rn = 0;