aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 8c1b2b945fe..d8619cdfa9e 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1321,6 +1321,28 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos)
1321 visible_p = 1; 1321 visible_p = 1;
1322 if (visible_p) 1322 if (visible_p)
1323 { 1323 {
1324 Lisp_Object window, prop;
1325
1326 XSETWINDOW (window, w);
1327 prop = Fget_char_property (make_number (it.position.charpos),
1328 Qinvisible, window);
1329
1330 /* If charpos coincides with invisible text covered with an
1331 ellipsis, use the first glyph of the ellipsis to compute
1332 the pixel positions. */
1333 if (TEXT_PROP_MEANS_INVISIBLE (prop) == 2)
1334 {
1335 struct glyph_row *row = it.glyph_row;
1336 struct glyph *glyph = row->glyphs[TEXT_AREA];
1337 struct glyph *end = glyph + row->used[TEXT_AREA];
1338 int x = row->x;
1339
1340 for (; glyph < end && glyph->charpos < charpos; glyph++)
1341 x += glyph->pixel_width;
1342
1343 top_x = x;
1344 }
1345
1324 *x = top_x; 1346 *x = top_x;
1325 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y); 1347 *y = max (top_y + max (0, it.max_ascent - it.ascent), window_top_y);
1326 *rtop = max (0, window_top_y - top_y); 1348 *rtop = max (0, window_top_y - top_y);