2000-06-06 Gerd Moellmann <gerd@gnu.org>
+ * xdisp.c (display_line): Set row's and iterator's
+ starts_in_middle_of_char_p and ends_in_middle_of_char_p flags.
+ Set cursor even if row ends in the middle of a character.
+ (dump_glyph_row): Print values of new flags.
+ (redisplay_window) <cursor movement in unchanged window>: When
+ point has been moved forward, and PT is at the end of the cursor
+ row, don't place the cursor in the next row if the cursor row ends
+ in the middle of a character or at ZV.
+
+ * dispextern.h (struct it): Add starts_in_middle_of_char_p.
+ (struct glyph_row): Add starts_in_middle_of_char_p and
+ ends_in_middle_of_char_p.
+ (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P): Test row's
+ ends_in_middle_of_char_p flag.
+ (MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P): Likewise.
+
* term.c (append_glyph): Revert change of 2000-06-06.
* xdisp.c (display_line): Revert change of 2000-06-06. Treat
/* 1 in a current row means this row is overlapped by another row. */
unsigned overlapped_p : 1;
+ /* 1 means this line ends in the middle of a character consisting
+ of more than one glyph. Some glyphs have been put in this row,
+ the rest are put in rows below this one. */
+ unsigned ends_in_middle_of_char_p : 1;
+
+ /* 1 means this line starts in the middle of a character consisting
+ of more than one glyph. Some glyphs have been put in the
+ previoius row, the rest are put in this row. */
+ unsigned starts_in_middle_of_char_p : 1;
+
/* 1 in a current row means this row overlaps others. */
unsigned overlapping_p : 1;
#define MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P(ROW) \
((ROW)->end.dpvec_index >= 0 \
- || (ROW)->end.overlay_string_index >= 0)
+ || (ROW)->end.overlay_string_index >= 0 \
+ || (ROW)->ends_in_middle_of_char_p)
/* Non-zero if ROW ends in the middle of an overlay string. */
#define MATRIX_ROW_STARTS_IN_MIDDLE_OF_CHAR_P(ROW) \
((ROW)->start.dpvec_index >= 0 \
+ || (ROW)->starts_in_middle_of_char_p \
|| ((ROW)->start.overlay_string_index >= 0 \
&& (ROW)->start.string_pos.charpos > 0))
/* 1 means the actual glyph is not available in the current
system. */
- unsigned glyph_not_available_p : 1;
+ unsigned glyph_not_available_p : 1;
+
+ /* 1 means the next line in display_line continues a character
+ consisting of more than one glyph, and some glyphs of this
+ character have been put on the previous line. */
+ unsigned starts_in_middle_of_char_p : 1;
/* The ID of the default face to use. One of DEFAULT_FACE_ID,
MODE_LINE_FACE_ID, or TOOL_BAR_FACE_ID, depending on what we