+ end = ZV;
+
+ /* If we're hscrolled at all, use compute_motion to skip over any
+ text off the left edge of the window. compute_motion may know
+ tricks to do this faster than we can. */
+ if (hpos < 0)
+ {
+ struct position *left_edge
+ = compute_motion (pos, vpos, hpos,
+ end, vpos, 0,
+ width, hscroll, taboffset, w);
+
+ /* Retrieve the buffer position and column provided by
+ compute_motion. We can't assume that the column will be
+ zero, because you may have multi-column characters crossing
+ the left margin.
+
+ compute_motion may have moved us past the screen position we
+ requested, if we hit a multi-column character, or the end of
+ the line. If so, back up. */
+ if (left_edge->vpos > vpos
+ || left_edge->hpos > 0)
+ {
+ pos = left_edge->bufpos - 1;
+ hpos = left_edge->prevhpos;
+ }
+ else
+ {
+ pos = left_edge->bufpos;
+ hpos = left_edge->hpos;
+ }
+ }
+
+ desired_glyphs->bufp[vpos] = start;