# HG changeset patch # User Kenichi Handa # Date 1140179752 0 # Node ID 2253db4514ba82e9e4046fbcaea4cfff02e34ac3 # Parent 332c5983daada3366f12f13e8f897ce255719707 (display_mode_element): Call display_string with correct PREC arg (which must be a number of characters, not column width). diff -r 332c5983daad -r 2253db4514ba src/xdisp.c --- a/src/xdisp.c Fri Feb 17 12:35:38 2006 +0000 +++ b/src/xdisp.c Fri Feb 17 12:35:52 2006 +0000 @@ -16477,8 +16477,11 @@ { 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 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,