aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c7
1 files 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)
16477 { 16477 {
16478 int bytepos = last_offset; 16478 int bytepos = last_offset;
16479 int charpos = string_byte_to_char (elt, bytepos); 16479 int charpos = string_byte_to_char (elt, bytepos);
16480
16481 if (precision <= 0)
16482 nchars = string_byte_to_char (elt, offset) - charpos;
16480 n += display_string (NULL, elt, Qnil, 0, charpos, 16483 n += display_string (NULL, elt, Qnil, 0, charpos,
16481 it, 0, prec, 0, 16484 it, 0, nchars, 0,
16482 STRING_MULTIBYTE (elt)); 16485 STRING_MULTIBYTE (elt));
16483 } 16486 }
16484 break; 16487 break;
@@ -17727,7 +17730,7 @@ display_count_lines (start, start_byte, limit_byte, count, byte_pos_ptr)
17727 display them, and < 0 means obey the current buffer's value of 17730 display them, and < 0 means obey the current buffer's value of
17728 enable_multibyte_characters. 17731 enable_multibyte_characters.
17729 17732
17730 Value is the number of glyphs produced. */ 17733 Value is the number of columns displayed. */
17731 17734
17732static int 17735static int
17733display_string (string, lisp_string, face_string, face_string_pos, 17736display_string (string, lisp_string, face_string, face_string_pos,