changeset 58248:2f12a89f27dd

(display_mode_element): Fix previous change (calculate end position of substring to display correctly).
author Kenichi Handa <handa@m17n.org>
date Tue, 16 Nov 2004 00:28:57 +0000
parents fdf2cb9626ab
children 615ae13a4f78
files src/xdisp.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/xdisp.c	Mon Nov 15 23:32:52 2004 +0000
+++ b/src/xdisp.c	Tue Nov 16 00:28:57 2004 +0000
@@ -15510,7 +15510,9 @@
 		  {
 		    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,