emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/xdisp.c,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/xdisp.c,v
Date: Sat, 26 Jan 2008 01:00:46 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/01/26 01:00:45

Index: xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1179
retrieving revision 1.1180
diff -u -b -r1.1179 -r1.1180
--- xdisp.c     25 Jan 2008 23:02:15 -0000      1.1179
+++ xdisp.c     26 Jan 2008 01:00:44 -0000      1.1180
@@ -1321,6 +1321,28 @@
          visible_p = 1;
       if (visible_p)
        {
+         Lisp_Object window, prop;
+
+         XSETWINDOW (window, w);
+         prop = Fget_char_property (make_number (it.position.charpos),
+                                    Qinvisible, window);
+
+         /* If charpos coincides with invisible text covered with an
+            ellipsis, use the first glyph of the ellipsis to compute
+            the pixel positions.  */
+         if (TEXT_PROP_MEANS_INVISIBLE (prop) == 2)
+           {
+             struct glyph_row *row = it.glyph_row;
+             struct glyph *glyph = row->glyphs[TEXT_AREA];
+             struct glyph *end = glyph + row->used[TEXT_AREA];
+             int x = row->x;
+
+             for (; glyph < end && glyph->charpos < charpos; glyph++)
+               x += glyph->pixel_width;
+
+             top_x = x;
+           }
+
          *x = top_x;
          *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
          *rtop = max (0, window_top_y - top_y);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]