]> git.eshelyaron.com Git - emacs.git/commitdiff
(display_mode_element): Fix previous change (calculate
authorKenichi Handa <handa@m17n.org>
Tue, 16 Nov 2004 00:30:13 +0000 (00:30 +0000)
committerKenichi Handa <handa@m17n.org>
Tue, 16 Nov 2004 00:30:13 +0000 (00:30 +0000)
end position of substring to display correctly).

src/ChangeLog
src/xdisp.c

index 105d81a6a75b317337fcd845a4466f936d26f101..52ec2d23b6fe5f0797f3380f9f1ff02fa7d2124b 100644 (file)
@@ -1,3 +1,8 @@
+2004-11-16  Kenichi Handa  <handa@m17n.org>
+
+       * xdisp.c (display_mode_element): Fix previous change (calculate
+       end position of substring to display correctly).
+
 2004-11-16  Kim F. Storm  <storm@cua.dk>
 
        * keyboard.c (Fposn_at_point): Remove extra */ after doc string.
index 6a03d2d6de4625e7a1c9a802349c82a3b8a5f0fd..e4e303941ef423cbf835367fe95100713fd5aae3 100644 (file)
@@ -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,