(Fpos_visible_in_window_p): Do something reasonable
if w->start is outside the buffer bounds.
This commit is contained in:
parent
9a5196d062
commit
61b5322b80
1 changed files with 4 additions and 0 deletions
|
@ -228,6 +228,10 @@ POS defaults to point; WINDOW, to the selected window.")
|
|||
if (posint > BUF_ZV (buf))
|
||||
return Qnil;
|
||||
|
||||
/* w->start can be out of range. If it is, do something reasonable. */
|
||||
if (top < BUF_BEGV (buf) || top > BUF_ZV (buf))
|
||||
return Qnil;
|
||||
|
||||
/* If that info is not correct, calculate afresh */
|
||||
posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0),
|
||||
posint, height, 0,
|
||||
|
|
Loading…
Add table
Reference in a new issue