# HG changeset patch # User Gerd Moellmann # Date 978437457 0 # Node ID 5854869b9445a9f2a53cc021c0556314b700c980 # Parent 3b286703dff9259ac9359391f4ee5af62beea126 (pos_visible_p): Take into account that CHARPOS maybe in or at the start of invisible text. diff -r 3b286703dff9 -r 5854869b9445 src/xdisp.c --- 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;