]> git.eshelyaron.com Git - emacs.git/commitdiff
* term.c (produce_stretch_glyph): Reduce width of stretch glyphs
authorChong Yidong <cyd@stupidchicken.com>
Fri, 3 Apr 2009 15:10:19 +0000 (15:10 +0000)
committerChong Yidong <cyd@stupidchicken.com>
Fri, 3 Apr 2009 15:10:19 +0000 (15:10 +0000)
so they don't get wider than the window, matching 2006-01-23
change to the partner function in xdisp.c (Bug#2800).

src/ChangeLog
src/term.c

index 08be07b117d6356a6adcc432af7488bb3fe65b4a..2c3075a70445c82571150852d3f630b2cd12a94f 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-03  Chong Yidong  <cyd@stupidchicken.com>
+
+       * term.c (produce_stretch_glyph): Reduce width of stretch glyphs
+       so they don't get wider than the window, matching 2006-01-23
+       change to the partner function in xdisp.c (Bug#2800).
+
 2009-04-03  Kenichi Handa  <handa@m17n.org>
 
        * print.c (print_object): Make each lowest sub_char_table start a
index 6d6bfaf412f9c10ec2835b5a7b660419d2433939..1c686eb521cea51bc6a4f366cc7848b66c2dd247 100644 (file)
@@ -1740,6 +1740,10 @@ produce_stretch_glyph (it)
   if (width <= 0 && (width < 0 || !zero_width_ok_p))
     width = 1;
 
+  if (width > 0 && it->line_wrap != TRUNCATE
+      && it->current_x + width > it->last_visible_x)
+    width = it->last_visible_x - it->current_x - 1;
+
   if (width > 0 && it->glyph_row)
     {
       Lisp_Object o_object = it->object;