Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7a6b6cce
Commit
7a6b6cce
authored
Oct 18, 2004
by
Kim F. Storm
Browse files
(display_mode_element): Fix display of wide chars.
From Kenichi Handa <handa@m17n.org>.
parent
e3e55463
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
src/xdisp.c
src/xdisp.c
+9
-5
No files found.
src/xdisp.c
View file @
7a6b6cce
...
...
@@ -7976,7 +7976,7 @@ store_frame_title (str, field_width, precision)
/* Copy at most PRECISION chars from STR. */
nbytes = strlen (str);
n+= c_string_width (str, nbytes, precision, &dummy, &nbytes);
n
+= c_string_width (str, nbytes, precision, &dummy, &nbytes);
while (nbytes--)
store_frame_title_char (*str++);
...
...
@@ -15457,14 +15457,15 @@ display_mode_element (it, depth, field_width, precision, elt, props, risky)
if (this - 1 != last)
{
int nchars, nbytes;
/* Output to end of string or up to '%'. Field width
is length of string. Don't output more than
PRECISION allows us. */
--this;
prec = chars_in_text (last, this - last);
if (precision > 0 && prec > precision - n)
prec = precision - n;
prec = c_string_width (last, this - last, precision - n,
&nchars, &nbytes);
if (frame_title_ptr)
n += store_frame_title (last, 0, prec);
...
...
@@ -15472,9 +15473,12 @@ 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)
: charpos + nchars);
n += store_mode_line_string (NULL,
Fsubstring (elt, make_number (charpos),
make_number (
charpos + prec
)),
make_number (
endpos
)),
0, 0, 0, Qnil);
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment