Commit f56ed24b authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(display_mode_element): Fix calculation of `bytepos'.

parent 50342b35
......@@ -13694,7 +13694,7 @@ display_mode_element (it, depth, field_width, precision, elt, props)
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment