]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix display of tooltips damaged by enhancements for bug #11832.
authorEli Zaretskii <eliz@gnu.org>
Tue, 24 Jul 2012 16:34:15 +0000 (19:34 +0300)
committerEli Zaretskii <eliz@gnu.org>
Tue, 24 Jul 2012 16:34:15 +0000 (19:34 +0300)
 src/xdisp.c (init_iterator): Don't compute dimensions of truncation
 and continuation glyphs on tooltip frames, leave them at zero.
 Avoids displaying continued lines in tooltips.

src/ChangeLog
src/xdisp.c

index 833fd8cc3c48c32826e2105668225f517c274870..a7ed81da2d237eb327c8a27c896e2a647be8f890 100644 (file)
@@ -1,3 +1,9 @@
+2012-07-24  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (init_iterator): Don't compute dimensions of truncation
+       and continuation glyphs on tooltip frames, leave them at zero.
+       Avoids continued lines in tooltips.  (Bug#11832)
+
 2012-07-24  Dmitry Antipov  <dmantipov@yandex.ru>
 
        Simplify copy_overlay.
index 4d77b56ad551b3d73c9f6189557a67562e80f749..1d3de61c5a34f45678ff8d55bf76f0297fd42bbb 100644 (file)
@@ -2733,20 +2733,25 @@ init_iterator (struct it *it, struct window *w,
 
   /* Get dimensions of truncation and continuation glyphs.  These are
      displayed as fringe bitmaps under X, but we need them for such
-     frames when the fringes are turned off.  */
-  if (it->line_wrap == TRUNCATE)
+     frames when the fringes are turned off.  But leave the dimensions
+     zero for tooltip frames, as these glyphs look ugly there and also
+     sabotage calculations of tooltip dimensions in x-show-tip.  */
+  if (!(FRAMEP (tip_frame) && it->f == XFRAME (tip_frame)))
     {
-      /* We will need the truncation glyph.  */
-      eassert (it->glyph_row == NULL);
-      produce_special_glyphs (it, IT_TRUNCATION);
-      it->truncation_pixel_width = it->pixel_width;
-    }
-  else
-    {
-      /* We will need the continuation glyph.  */
-      eassert (it->glyph_row == NULL);
-      produce_special_glyphs (it, IT_CONTINUATION);
-      it->continuation_pixel_width = it->pixel_width;
+      if (it->line_wrap == TRUNCATE)
+       {
+         /* We will need the truncation glyph.  */
+         eassert (it->glyph_row == NULL);
+         produce_special_glyphs (it, IT_TRUNCATION);
+         it->truncation_pixel_width = it->pixel_width;
+       }
+      else
+       {
+         /* We will need the continuation glyph.  */
+         eassert (it->glyph_row == NULL);
+         produce_special_glyphs (it, IT_CONTINUATION);
+         it->continuation_pixel_width = it->pixel_width;
+       }
     }
 
   /* Reset these values to zero because the produce_special_glyphs