From ab5b02b01f9ac6f21d5083e950b4032be9b34eb7 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Tue, 16 Nov 2004 00:30:13 +0000 Subject: [PATCH] (display_mode_element): Fix previous change (calculate end position of substring to display correctly). --- src/ChangeLog | 5 +++++ src/xdisp.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 105d81a6a75..52ec2d23b6f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-11-16 Kenichi Handa + + * xdisp.c (display_mode_element): Fix previous change (calculate + end position of substring to display correctly). + 2004-11-16 Kim F. Storm * keyboard.c (Fposn_at_point): Remove extra */ after doc string. diff --git a/src/xdisp.c b/src/xdisp.c index 6a03d2d6de4..e4e303941ef 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -15510,7 +15510,9 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky) { int bytepos = last - lisp_string; int charpos = string_byte_to_char (elt, bytepos); - int endpos = (precision <= 0 ? SCHARS (elt) + int endpos = (precision <= 0 + ? string_byte_to_char (elt, + this - lisp_string) : charpos + nchars); n += store_mode_line_string (NULL, -- 2.39.2