aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2011-09-18 19:17:40 +0300
committerEli Zaretskii2011-09-18 19:17:40 +0300
commitc02dcedf1b2ab40e4d1ea55bac6923c3c5249e86 (patch)
treedda64161d907d3644c097085a40e5c1b5b89cc05 /src
parent2176854d0f9ac69351a785e8787271d7ee43252f (diff)
downloademacs-c02dcedf1b2ab40e4d1ea55bac6923c3c5249e86.tar.gz
emacs-c02dcedf1b2ab40e4d1ea55bac6923c3c5249e86.zip
Fix a bug in :align-to on a TTY when the column is beyond frame width.
src/xdisp.c (produce_stretch_glyph): Don't subtract 1 "pixel" when computing width of the stretch on a TTY.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xdisp.c9
2 files changed, 11 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 09ac0d78e73..b81c5cf9792 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -5,6 +5,9 @@
5 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record 5 stretch). Fixes bug#9530 on a TTY. Under word-wrap, don't record
6 buffer positions that will be removed from the glyph row because 6 buffer positions that will be removed from the glyph row because
7 they don't fit. 7 they don't fit.
8 (produce_stretch_glyph): Fix a bug in :align-to on a TTY when the
9 column is beyond frame width: don't subtract 1 "pixel" when
10 computing width of the stretch.
8 11
92011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> 122011-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
10 13
diff --git a/src/xdisp.c b/src/xdisp.c
index b2859d0767b..97d59644b15 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -23293,7 +23293,14 @@ produce_stretch_glyph (struct it *it)
23293 23293
23294 if (width > 0 && it->line_wrap != TRUNCATE 23294 if (width > 0 && it->line_wrap != TRUNCATE
23295 && it->current_x + width > it->last_visible_x) 23295 && it->current_x + width > it->last_visible_x)
23296 width = it->last_visible_x - it->current_x - 1; 23296 {
23297 width = it->last_visible_x - it->current_x;
23298#ifdef HAVE_WINDOW_SYSTEM
23299 /* Subtact one more pixel from the stretch width, but only on
23300 GUI frames, since on a TTY each glyph is one "pixel" wide. */
23301 width -= FRAME_WINDOW_P (it->f);
23302#endif
23303 }
23297 23304
23298 if (width > 0 && height > 0 && it->glyph_row) 23305 if (width > 0 && height > 0 && it->glyph_row)
23299 { 23306 {