diff options
| author | Kim F. Storm | 2006-09-20 09:43:18 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2006-09-20 09:43:18 +0000 |
| commit | 0dd956164b35a992de5846567d6c57b5ad4be256 (patch) | |
| tree | a0ea7df7adac9867e7211e8518b20028c759e1e5 /src | |
| parent | d0e0bd5f4b0c75a00ac0b392d7e0e2defacf57fc (diff) | |
| download | emacs-0dd956164b35a992de5846567d6c57b5ad4be256.tar.gz emacs-0dd956164b35a992de5846567d6c57b5ad4be256.zip | |
(pos_visible_p): CHARPOS < 0 means return info for
last visible glyph in window.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 6efd0958002..c766f714335 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1275,6 +1275,7 @@ line_bottom_y (it) | |||
| 1275 | 1275 | ||
| 1276 | 1276 | ||
| 1277 | /* Return 1 if position CHARPOS is visible in window W. | 1277 | /* Return 1 if position CHARPOS is visible in window W. |
| 1278 | CHARPOS < 0 means return info about WINDOW_END position. | ||
| 1278 | If visible, set *X and *Y to pixel coordinates of top left corner. | 1279 | If visible, set *X and *Y to pixel coordinates of top left corner. |
| 1279 | Set *RTOP and *RBOT to pixel height of an invisible area of glyph at POS. | 1280 | Set *RTOP and *RBOT to pixel height of an invisible area of glyph at POS. |
| 1280 | Set *ROWH and *VPOS to row's visible height and VPOS (row number). */ | 1281 | Set *ROWH and *VPOS to row's visible height and VPOS (row number). */ |
| @@ -1313,10 +1314,10 @@ pos_visible_p (w, charpos, x, y, rtop, rbot, rowh, vpos) | |||
| 1313 | 1314 | ||
| 1314 | start_display (&it, w, top); | 1315 | start_display (&it, w, top); |
| 1315 | move_it_to (&it, charpos, -1, it.last_visible_y-1, -1, | 1316 | move_it_to (&it, charpos, -1, it.last_visible_y-1, -1, |
| 1316 | MOVE_TO_POS | MOVE_TO_Y); | 1317 | (charpos >= 0 ? MOVE_TO_POS : 0) | MOVE_TO_Y); |
| 1317 | 1318 | ||
| 1318 | /* Note that we may overshoot because of invisible text. */ | 1319 | /* Note that we may overshoot because of invisible text. */ |
| 1319 | if (IT_CHARPOS (it) >= charpos) | 1320 | if (charpos >= 0 && IT_CHARPOS (it) >= charpos) |
| 1320 | { | 1321 | { |
| 1321 | int top_x = it.current_x; | 1322 | int top_x = it.current_x; |
| 1322 | int top_y = it.current_y; | 1323 | int top_y = it.current_y; |