if (success_p && it->dpvec == NULL)
{
Lisp_Object dv;
+ struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte);
if (it->dp
&& (dv = DISP_CHAR_VECTOR (it->dp, it->c),
|| it->c == 0xAD /* SOFT HYPHEN */)))
: (it->c >= 127
&& (! unibyte_display_via_language_environment
- || (UNIBYTE_CHAR_HAS_MULTIBYTE_P (it->c)))))))
+ || (DECODE_CHAR (unibyte, it->c) <= 0xA0))))))
{
/* IT->c is a control character which must be displayed
either as '\003' or as `^C' where the '\\' and '^'
int op;
{
enum move_it_result skip, skip2 = MOVE_X_REACHED;
- int line_height;
- int reached = 0;
+ int line_height, line_start_x = 0, reached = 0;
for (;;)
{
if (it->current_x != it->last_visible_x
&& (op & MOVE_TO_VPOS)
&& !(op & (MOVE_TO_X | MOVE_TO_POS)))
- set_iterator_to_next (it, 0);
+ {
+ line_start_x = it->current_x + it->pixel_width
+ - it->last_visible_x;
+ set_iterator_to_next (it, 0);
+ }
}
else
it->continuation_lines_width += it->current_x;
/* Reset/increment for the next run. */
recenter_overlay_lists (current_buffer, IT_CHARPOS (*it));
- it->current_x = it->hpos = 0;
+ it->current_x = line_start_x;
+ line_start_x = 0;
+ it->hpos = 0;
it->current_y += it->max_ascent + it->max_descent;
++it->vpos;
last_height = it->max_ascent + it->max_descent;
{
if (SINGLE_BYTE_CHAR_P (it->c)
&& unibyte_display_via_language_environment)
- it->char_to_display = unibyte_char_to_multibyte (it->c);
- if (! SINGLE_BYTE_CHAR_P (it->char_to_display))
{
+ struct charset *unibyte = CHARSET_FROM_ID (charset_unibyte);
+
+ /* get_next_display_element assures that this decoding
+ never fails. */
+ it->char_to_display = DECODE_CHAR (unibyte, it->c);
it->multibyte_p = 1;
it->face_id = FACE_FOR_CHAR (it->f, face, it->char_to_display,
-1, Qnil);