aboutsummaryrefslogtreecommitdiffstats
path: root/src/term.c
diff options
context:
space:
mode:
authorMiles Bader2006-02-08 04:26:44 +0000
committerMiles Bader2006-02-08 04:26:44 +0000
commit380874900ca183ec2fdce91949d841328852d7a8 (patch)
tree6918a4182f8657251e83223511aa7827fb8820ed /src/term.c
parent72b464afc12a7532fc8555352db04c65647c15ae (diff)
parentc96ec15a58817ac97db5348187e2d8695f609cb5 (diff)
downloademacs-380874900ca183ec2fdce91949d841328852d7a8.tar.gz
emacs-380874900ca183ec2fdce91949d841328852d7a8.zip
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-13
Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 43-57) - Update from CVS - Merge from erc--emacs--0 - Make constrain-to-field notice overlays - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 18-21) - Update from CVS - Merge from emacs--devo--0
Diffstat (limited to 'src/term.c')
-rw-r--r--src/term.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/src/term.c b/src/term.c
index aae4f7dffdc..c12ae8937d8 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1,6 +1,6 @@
1/* Terminal control module for terminals described by TERMCAP 1/* Terminal control module for terminals described by TERMCAP
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001, 2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1998, 2000, 2001,
3 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 3 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -1659,10 +1659,10 @@ static void produce_stretch_glyph P_ ((struct it *));
1659 1659
1660 1660
1661/* Append glyphs to IT's glyph_row. Called from produce_glyphs for 1661/* Append glyphs to IT's glyph_row. Called from produce_glyphs for
1662 terminal frames if IT->glyph_row != NULL. IT->c is the character 1662 terminal frames if IT->glyph_row != NULL. IT->char_to_display is
1663 for which to produce glyphs; IT->face_id contains the character's 1663 the character for which to produce glyphs; IT->face_id contains the
1664 face. Padding glyphs are appended if IT->c has a IT->pixel_width > 1664 character's face. Padding glyphs are appended if IT->c has a
1665 1. */ 1665 IT->pixel_width > 1. */
1666 1666
1667static void 1667static void
1668append_glyph (it) 1668append_glyph (it)
@@ -1682,7 +1682,7 @@ append_glyph (it)
1682 { 1682 {
1683 glyph->type = CHAR_GLYPH; 1683 glyph->type = CHAR_GLYPH;
1684 glyph->pixel_width = 1; 1684 glyph->pixel_width = 1;
1685 glyph->u.ch = it->c; 1685 glyph->u.ch = it->char_to_display;
1686 glyph->face_id = it->face_id; 1686 glyph->face_id = it->face_id;
1687 glyph->padding_p = i > 0; 1687 glyph->padding_p = i > 0;
1688 glyph->charpos = CHARPOS (it->position); 1688 glyph->charpos = CHARPOS (it->position);
@@ -1733,6 +1733,9 @@ produce_glyphs (it)
1733 xassert (it->what == IT_CHARACTER 1733 xassert (it->what == IT_CHARACTER
1734 || it->what == IT_COMPOSITION); 1734 || it->what == IT_COMPOSITION);
1735 1735
1736 /* Maybe translate single-byte characters to multibyte. */
1737 it->char_to_display = it->c;
1738
1736 if (it->c >= 040 && it->c < 0177) 1739 if (it->c >= 040 && it->c < 0177)
1737 { 1740 {
1738 it->pixel_width = it->nglyphs = 1; 1741 it->pixel_width = it->nglyphs = 1;
@@ -1762,13 +1765,11 @@ produce_glyphs (it)
1762 { 1765 {
1763 int n = nspaces; 1766 int n = nspaces;
1764 1767
1765 it->c = ' '; 1768 it->char_to_display = ' ';
1766 it->pixel_width = it->len = 1; 1769 it->pixel_width = it->len = 1;
1767 1770
1768 while (n--) 1771 while (n--)
1769 append_glyph (it); 1772 append_glyph (it);
1770
1771 it->c = '\t';
1772 } 1773 }
1773 1774
1774 it->pixel_width = nspaces; 1775 it->pixel_width = nspaces;
@@ -1861,17 +1862,15 @@ produce_stretch_glyph (it)
1861 Lisp_Object o_object = it->object; 1862 Lisp_Object o_object = it->object;
1862 Lisp_Object object = it->stack[it->sp - 1].string; 1863 Lisp_Object object = it->stack[it->sp - 1].string;
1863 int n = width; 1864 int n = width;
1864 int c = it->c;
1865 1865
1866 if (!STRINGP (object)) 1866 if (!STRINGP (object))
1867 object = it->w->buffer; 1867 object = it->w->buffer;
1868 it->object = object; 1868 it->object = object;
1869 it->c = ' '; 1869 it->char_to_display = ' ';
1870 it->pixel_width = it->len = 1; 1870 it->pixel_width = it->len = 1;
1871 while (n--) 1871 while (n--)
1872 append_glyph (it); 1872 append_glyph (it);
1873 it->object = o_object; 1873 it->object = o_object;
1874 it->c = c;
1875 } 1874 }
1876 it->pixel_width = width; 1875 it->pixel_width = width;
1877 it->nglyphs = width; 1876 it->nglyphs = width;