]> git.eshelyaron.com Git - emacs.git/commitdiff
(display_mode_element): Call display_string with correct
authorKenichi Handa <handa@m17n.org>
Fri, 17 Feb 2006 12:35:52 +0000 (12:35 +0000)
committerKenichi Handa <handa@m17n.org>
Fri, 17 Feb 2006 12:35:52 +0000 (12:35 +0000)
PREC arg (which must be a number of characters, not column width).

src/xdisp.c

index b25bebe385731dbc57be65623d7aaa7e491e9ecf..9006687cd36e81927469c1fb514613700b4f41d5 100644 (file)
@@ -16477,8 +16477,11 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
                    {
                      int bytepos = last_offset;
                      int charpos = string_byte_to_char (elt, bytepos);
+
+                     if (precision <= 0)
+                       nchars = string_byte_to_char (elt, offset) - charpos;
                      n += display_string (NULL, elt, Qnil, 0, charpos,
-                                          it, 0, prec, 0,
+                                          it, 0, nchars, 0,
                                           STRING_MULTIBYTE (elt));
                    }
                    break;
@@ -17727,7 +17730,7 @@ display_count_lines (start, start_byte, limit_byte, count, byte_pos_ptr)
    display them, and < 0 means obey the current buffer's value of
    enable_multibyte_characters.
 
-   Value is the number of glyphs produced.  */
+   Value is the number of columns displayed.  */
 
 static int
 display_string (string, lisp_string, face_string, face_string_pos,