# HG changeset patch # User Kenichi Handa # Date 1018338147 0 # Node ID 25703715d32ea70cd5489f9011b9b651bbe2f6fb # Parent 51e9e2d876e1926614e64f9b9cb682a73f434c9f (display_mode_element): Fix calculation of `bytepos'. diff -r 51e9e2d876e1 -r 25703715d32e src/xdisp.c --- a/src/xdisp.c Tue Apr 09 07:42:06 2002 +0000 +++ b/src/xdisp.c Tue Apr 09 07:42:27 2002 +0000 @@ -13694,7 +13694,7 @@ int nglyphs_before, bytepos, charpos, nwritten; nglyphs_before = it->glyph_row->used[TEXT_AREA]; - bytepos = percent_position - XSTRING (elt)->data; + bytepos = percent_position - lisp_string; charpos = (STRING_MULTIBYTE (elt) ? string_byte_to_char (elt, bytepos) : bytepos);