j = it->current.overlay_string_index;
while (i < OVERLAY_STRING_CHUNK_SIZE && j < n)
{
- it->overlay_strings[i++] = entries[j++].string;
+ it->overlay_strings[i] = entries[j].string;
it->string_overlays[i++] = entries[j++].overlay;
}
{
XRectangle cr, result;
struct glyph *cursor_glyph;
+ struct glyph_row *row;
+
+ if (w->phys_cursor.vpos >= 0
+ && w->phys_cursor.vpos < w->current_matrix->nrows
+ && (row = MATRIX_ROW (w->current_matrix, w->phys_cursor.vpos),
+ row->enabled_p)
+ && row->cursor_in_fringe_p)
+ {
+ /* Cursor is in the fringe. */
+ cr.x = window_box_right_offset (w,
+ (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
+ ? RIGHT_MARGIN_AREA
+ : TEXT_AREA));
+ cr.y = row->y;
+ cr.width = WINDOW_RIGHT_FRINGE_WIDTH (w);
+ cr.height = row->height;
+ return x_intersect_rectangles (&cr, r, &result);
+ }
cursor_glyph = get_phys_cursor_glyph (w);
if (cursor_glyph)
DEFVAR_INT ("scroll-conservatively", &scroll_conservatively,
doc: /* *Scroll up to this many lines, to bring point back on screen.
-A value of zero means to scroll the text to center point vertically
-in the window. */);
+If point moves off-screen, redisplay will scroll by up to
+`scroll-conservatively' lines in order to bring point just barely
+onto the screen again. If that cannot be done, then redisplay
+recenters point as usual.
+
+A value of zero means always recenter point if it moves off screen. */);
scroll_conservatively = 0;
DEFVAR_INT ("scroll-margin", &scroll_margin,