Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
71a91515
Commit
71a91515
authored
Jul 27, 2018
by
Eli Zaretskii
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* src/character.c (char_width): Support glyphs with faces. (Bug#32276)
parent
0feb6733
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
src/character.c
src/character.c
+9
-6
No files found.
src/character.c
View file @
71a91515
...
...
@@ -34,6 +34,7 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "lisp.h"
#include "character.h"
#include "buffer.h"
#include "dispextern.h"
#include "composite.h"
#include "disptab.h"
...
...
@@ -288,13 +289,15 @@ char_width (int c, struct Lisp_Char_Table *dp)
if
(
VECTORP
(
disp
))
for
(
i
=
0
,
width
=
0
;
i
<
ASIZE
(
disp
);
i
++
)
{
int
c
;
ch
=
AREF
(
disp
,
i
);
if
(
CHARACTERP
(
ch
))
{
int
w
=
CHARACTER_WIDTH
(
XFASTINT
(
ch
));
if
(
INT_ADD_WRAPV
(
width
,
w
,
&
width
))
string_overflow
();
}
if
(
GLYPH_CODE_P
(
ch
))
c
=
GLYPH_CODE_CHAR
(
ch
);
else
if
(
CHARACTERP
(
ch
))
c
=
XFASTINT
(
ch
);
int
w
=
CHARACTER_WIDTH
(
c
);
if
(
INT_ADD_WRAPV
(
width
,
w
,
&
width
))
string_overflow
();
}
}
return
width
;
...
...
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