src/xdisp.c (produce_stretch_glyph): Don't subtract 1 "pixel" when
computing width of the stretch on a TTY.
stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
buffer positions that will be removed from the glyph row because
they don't fit.
+ (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
+ column is beyond frame width: don't subtract 1 "pixel" when
+ computing width of the stretch.
2011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
if (width > 0 && it->line_wrap != TRUNCATE
&& it->current_x + width > it->last_visible_x)
- width = it->last_visible_x - it->current_x - 1;
+ {
+ width = it->last_visible_x - it->current_x;
+#ifdef HAVE_WINDOW_SYSTEM
+ /* Subtact one more pixel from the stretch width, but only on
+ GUI frames, since on a TTY each glyph is one "pixel" wide. */
+ width -= FRAME_WINDOW_P (it->f);
+#endif
+ }
if (width > 0 && height > 0 && it->glyph_row)
{