+2002-11-29 Richard M. Stallman <rms@gnu.org>
+
+ * xdisp.c (start_display): Check more intelligently for
+ whether the line is continued.
+ (move_it_vertically_backward): Clear it->continuation_lines_width.
+
2002-11-28 Dave Love <fx@gnu.org>
* s/amdahl.h, s/unipl5-0.h, m/sgi3000.h, s/3700.h, s/alliant-2800.h:
|| FETCH_BYTE (BYTEPOS (pos) - 1) == '\n');
if (!start_at_line_beg_p)
{
+ int new_x;
+
reseat_at_previous_visible_line_start (it);
move_it_to (it, CHARPOS (pos), -1, -1, -1, MOVE_TO_POS);
+ new_x = it->current_x + it->pixel_width;
+
/* If lines are continued, this line may end in the middle
of a multi-glyph character (e.g. a control character
displayed as \003, or in the middle of an overlay
string). In this case move_it_to above will not have
taken us to the start of the continuation line but to the
end of the continued line. */
- if (it->current_x > 0)
+ if (it->current_x > 0
+ && !it->truncate_lines_p /* Lines are continued. */
+ && (/* And glyph doesn't fit on the line. */
+ new_x > it->last_visible_x
+ /* Or it fits exactly and we're on a window
+ system frame. */
+ || (new_x == it->last_visible_x
+ && FRAME_WINDOW_P (it->f))))
{
if (it->current.dpvec_index >= 0
|| it->current.overlay_string_index >= 0)
/* We are now surely at a line start. */
it->current_x = it->hpos = 0;
+ it->continuation_lines_width = 0;
/* Move forward and see what y-distance we moved. First move to the
start of the next line so that we get its height. We need this