aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispref/display.texi5
-rw-r--r--src/xdisp.c7
2 files changed, 5 insertions, 7 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 6a30adf9c90..452462adcfc 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -4387,8 +4387,9 @@ width. @var{width} can also be a @dfn{pixel width} specification
4387Specifies that the width of the stretch should be computed from the 4387Specifies that the width of the stretch should be computed from the
4388first character in the group of consecutive characters that have the 4388first character in the group of consecutive characters that have the
4389same @code{display} property. The space width is the pixel width of 4389same @code{display} property. The space width is the pixel width of
4390that character, multiplied by @var{factor}. This specification is 4390that character, multiplied by @var{factor}. (On text-mode terminals,
4391only supported on graphic terminals. 4391the ``pixel width'' of a character is usually 1, but it could be more
4392for TABs and double-width CJK characters.)
4392 4393
4393@item :align-to @var{hpos} 4394@item :align-to @var{hpos}
4394Specifies that the space should be wide enough to reach @var{hpos}. 4395Specifies that the space should be wide enough to reach @var{hpos}.
diff --git a/src/xdisp.c b/src/xdisp.c
index 0d0bc91efd9..bac74e2a34f 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -25956,9 +25956,7 @@ produce_stretch_glyph (struct it *it)
25956 zero_width_ok_p = true; 25956 zero_width_ok_p = true;
25957 width = (int)tem; 25957 width = (int)tem;
25958 } 25958 }
25959#ifdef HAVE_WINDOW_SYSTEM 25959 else if (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0)
25960 else if (FRAME_WINDOW_P (it->f)
25961 && (prop = Fplist_get (plist, QCrelative_width), NUMVAL (prop) > 0))
25962 { 25960 {
25963 /* Relative width `:relative-width FACTOR' specified and valid. 25961 /* Relative width `:relative-width FACTOR' specified and valid.
25964 Compute the width of the characters having the `glyph' 25962 Compute the width of the characters having the `glyph'
@@ -25978,10 +25976,9 @@ produce_stretch_glyph (struct it *it)
25978 25976
25979 it2.glyph_row = NULL; 25977 it2.glyph_row = NULL;
25980 it2.what = IT_CHARACTER; 25978 it2.what = IT_CHARACTER;
25981 x_produce_glyphs (&it2); 25979 PRODUCE_GLYPHS (&it2);
25982 width = NUMVAL (prop) * it2.pixel_width; 25980 width = NUMVAL (prop) * it2.pixel_width;
25983 } 25981 }
25984#endif /* HAVE_WINDOW_SYSTEM */
25985 else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop)) 25982 else if ((prop = Fplist_get (plist, QCalign_to), !NILP (prop))
25986 && calc_pixel_width_or_height (&tem, it, prop, font, true, 25983 && calc_pixel_width_or_height (&tem, it, prop, font, true,
25987 &align_to)) 25984 &align_to))