From 26f622b36b227a5a3932045097a5f7a290859af2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 15 Jan 2002 17:22:17 +0000 Subject: [PATCH] (display_mode_element): When computing charpos, depend on multibyteness of elt, not the text in field. --- src/ChangeLog | 5 +++++ src/xdisp.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 26c78865695..98a6c7184bf 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2002-01-15 Eli Zaretskii + + * xdisp.c (display_mode_element): When computing charpos, depend + on multibytenes of elt, not the text in field. + 2002-01-15 Pavel Jan,Bm(Bk * buffer.c (Fkill_all_local_variables): Increment diff --git a/src/xdisp.c b/src/xdisp.c index d7491121ee0..694935c9c02 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -13607,7 +13607,7 @@ display_mode_element (it, depth, field_width, precision, elt) nglyphs_before = it->glyph_row->used[TEXT_AREA]; bytepos = percent_position - XSTRING (elt)->data; - charpos = (multibyte + charpos = (STRING_MULTIBYTE (elt) ? string_byte_to_char (elt, bytepos) : bytepos); nwritten = display_string (spec, Qnil, elt, -- 2.39.5