Mercurial > emacs
diff src/xdisp.c @ 34947:5854869b9445
(pos_visible_p): Take into account that CHARPOS maybe
in or at the start of invisible text.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Tue, 02 Jan 2001 12:10:57 +0000 |
parents | 2470fec0dd92 |
children | cf1115a9c758 |
line wrap: on
line diff
--- a/src/xdisp.c Tue Jan 02 10:35:32 2001 +0000 +++ b/src/xdisp.c Tue Jan 02 12:10:57 2001 +0000 @@ -1012,8 +1012,9 @@ start_display (&it, w, top); move_it_to (&it, charpos, 0, it.last_visible_y, -1, MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y); - - if (IT_CHARPOS (it) == charpos) + + /* Note that we may overshoot because of invisible text. */ + if (IT_CHARPOS (it) >= charpos) { int line_height, line_bottom_y; int line_top_y = it.current_y;