argument is ZV to prevent move_it_in_display_line from matching
based on buffer positions. */
move_it_in_display_line (&it, ZV, to_x, MOVE_TO_X);
- bidi_unshelve_cache (itdata);
+ bidi_unshelve_cache (itdata, 0);
Fset_buffer (old_current_buffer);
if (STRINGP (it.string))
BYTEPOS (pos->pos) = string_char_to_byte (string, CHARPOS (pos->pos));
else
- BYTEPOS (pos->pos) = CHAR_TO_BYTE (CHARPOS (pos->pos));
+ BYTEPOS (pos->pos) = buf_charpos_to_bytepos (XBUFFER (w->buffer),
+ CHARPOS (pos->pos));
}
#ifdef HAVE_WINDOW_SYSTEM