HPOS got from w->last_point_x, call it with DID_MOTION 1.
(display_text_line): Stop the loop for processing overlay strings
when we reach the right edge of the window.
int tab_offset = (pos_tab_offset (w, last_point, last_point_byte)
- (last_point_x + hscroll - !! hscroll));
- pos = *compute_motion (last_point, last_point_y, last_point_x, 0,
+ pos = *compute_motion (last_point, last_point_y, last_point_x, 1,
PT, height,
/* BUG FIX: See the comment of
Fpos_visible_in_window_p (window.c). */
ovstr += ovstr_done;
ovlen -= ovstr_done;
- while (ovlen > 0)
+ while (ovlen > 0 && p1 < endp)
{
int charset, cols;
GLYPH g;