From 8a39d7dad8649b42887305dc3abaccce5abb6cec Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 17 Feb 2006 12:35:52 +0000 Subject: [PATCH] (display_mode_element): Call display_string with correct PREC arg (which must be a number of characters, not column width). --- src/xdisp.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index b25bebe3857..9006687cd36 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -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, -- 2.39.2