Commit bd01620e authored by Eli Zaretskii's avatar Eli Zaretskii

Add comments about special meaning of TAB characters in compositions.

 src/xterm.c (x_draw_composite_glyph_string_foreground):
 src/w32term.c (x_draw_composite_glyph_string_foreground):
 src/term.c (encode_terminal_code):
 src/composite.c (composition_update_it, get_composition_id):
 src/xdisp.c (get_next_display_element)
 (fill_composite_glyph_string): Add comments about special meaning
 of TAB characters in a composition.
parent a02719a3
2011-09-15 Eli Zaretskii <eliz@gnu.org>
* xterm.c (x_draw_composite_glyph_string_foreground):
* w32term.c (x_draw_composite_glyph_string_foreground):
* term.c (encode_terminal_code):
* composite.c (composition_update_it, get_composition_id):
* xdisp.c (get_next_display_element)
(fill_composite_glyph_string): Add comments about special meaning
of TAB characters in a composition.
2011-09-15 Paul Eggert <eggert@cs.ucla.edu>
* editfns.c (Fformat): Fix off-by-1 bug for "%%b" (Bug#9514).
......
......@@ -345,6 +345,8 @@ get_composition_id (EMACS_INT charpos, EMACS_INT bytepos, EMACS_INT nchars,
{
int this_width;
ch = XINT (key_contents[i]);
/* TAB in a composition means display glyphs with padding
space on the left or right. */
this_width = (ch == '\t' ? 1 : CHAR_WIDTH (ch));
if (cmp->width < this_width)
cmp->width = this_width;
......@@ -1384,6 +1386,8 @@ composition_update_it (struct composition_it *cmp_it, EMACS_INT charpos, EMACS_I
else
{
for (i = 0; i < cmp->glyph_len; i++)
/* TAB in a composition means display glyphs with padding
space on the left or right. */
if ((c = COMPOSITION_GLYPH (cmp, i)) != '\t')
break;
if (c == '\t')
......
......@@ -574,6 +574,8 @@ encode_terminal_code (struct glyph *src, int src_len, struct coding_system *codi
{
int c = COMPOSITION_GLYPH (cmp, i);
/* TAB in a composition means display glyphs with
padding space on the left or right. */
if (c == '\t')
continue;
if (char_charset (c, charset_list, NULL))
......
......@@ -1294,6 +1294,8 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s)
old_font = SelectObject (s->hdc, FONT_HANDLE (font));
for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++)
/* TAB in a composition means display glyphs with padding
space on the left or right. */
if (COMPOSITION_GLYPH (s->cmp, j) != '\t')
{
int xx = x + s->cmp->offsets[j * 2];
......
......@@ -1306,6 +1306,8 @@ x_draw_composite_glyph_string_foreground (struct glyph_string *s)
int y = s->ybase;
for (i = 0, j = s->cmp_from; i < s->nchars; i++, j++)
/* TAB in a composition means display glyphs with padding
space on the left or right. */
if (COMPOSITION_GLYPH (s->cmp, j) != '\t')
{
int xx = x + s->cmp->offsets[j * 2];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment