From: Gerd Moellmann Date: Tue, 2 Jan 2001 12:11:32 +0000 (+0000) Subject: (pos_visible_p): Take into account that CHARPOS maybe X-Git-Tag: emacs-pretest-21.0.95~213 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a13be20798a4fc282b9955c9684916be88c3196e;p=emacs.git (pos_visible_p): Take into account that CHARPOS maybe in or at the start of invisible text. --- diff --git a/src/ChangeLog b/src/ChangeLog index 638c1c0fdbe..c435a921af5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ 2001-01-02 Gerd Moellmann + * xdisp.c (pos_visible_p): Take into account that CHARPOS maybe + in or at the start of invisible text. + * dispnew.c (update_window): Don't check_current_matrix_flags. 2001-01-01 Jason Rumney diff --git a/src/xdisp.c b/src/xdisp.c index ed98ced48a2..c1b312f1a42 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1012,8 +1012,9 @@ pos_visible_p (w, charpos, fully, exact_mode_line_heights_p) 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;