diff options
| author | Richard M. Stallman | 1994-08-08 10:14:32 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-08-08 10:14:32 +0000 |
| commit | 61b5322b80d54879e2abddbc8116b970a48418c1 (patch) | |
| tree | 335e7645020ad4293e674989047460fba0946310 /src | |
| parent | 9a5196d062e9fdb40484c918d0b539d87aef98b4 (diff) | |
| download | emacs-61b5322b80d54879e2abddbc8116b970a48418c1.tar.gz emacs-61b5322b80d54879e2abddbc8116b970a48418c1.zip | |
(Fpos_visible_in_window_p): Do something reasonable
if w->start is outside the buffer bounds.
Diffstat (limited to 'src')
| -rw-r--r-- | src/window.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c index bec4aaa30cf..e89fa874c84 100644 --- a/src/window.c +++ b/src/window.c | |||
| @@ -228,6 +228,10 @@ POS defaults to point; WINDOW, to the selected window.") | |||
| 228 | if (posint > BUF_ZV (buf)) | 228 | if (posint > BUF_ZV (buf)) |
| 229 | return Qnil; | 229 | return Qnil; |
| 230 | 230 | ||
| 231 | /* w->start can be out of range. If it is, do something reasonable. */ | ||
| 232 | if (top < BUF_BEGV (buf) || top > BUF_ZV (buf)) | ||
| 233 | return Qnil; | ||
| 234 | |||
| 231 | /* If that info is not correct, calculate afresh */ | 235 | /* If that info is not correct, calculate afresh */ |
| 232 | posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0), | 236 | posval = *compute_motion (top, 0, (hscroll ? 1 - hscroll : 0), |
| 233 | posint, height, 0, | 237 | posint, height, 0, |