Mercurial > emacs
comparison src/xdisp.c @ 16554:f930574421d9
(redisplay_window): Handle optional_new_start.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 10 Nov 1996 00:25:30 +0000 |
parents | 2337ed73b33e |
children | 8b1dd6f2222d |
comparison
equal
deleted
inserted
replaced
16553:39aa8dd49637 | 16554:f930574421d9 |
---|---|
1579 /* If window-start is screwed up, choose a new one. */ | 1579 /* If window-start is screwed up, choose a new one. */ |
1580 if (XMARKER (w->start)->buffer != current_buffer) | 1580 if (XMARKER (w->start)->buffer != current_buffer) |
1581 goto recenter; | 1581 goto recenter; |
1582 | 1582 |
1583 startp = marker_position (w->start); | 1583 startp = marker_position (w->start); |
1584 | |
1585 /* If someone specified a new starting point but did not insist, | |
1586 check whether it can be used. */ | |
1587 if (!NILP (w->optional_new_start)) | |
1588 { | |
1589 w->optional_new_start = Qnil; | |
1590 /* Check whether this start pos is usable given where point is. */ | |
1591 | |
1592 pos = *compute_motion (startp, 0, | |
1593 (((EQ (window, minibuf_window) | |
1594 && startp == BEG) | |
1595 ? minibuf_prompt_width : 0) | |
1596 + (hscroll ? 1 - hscroll : 0)), | |
1597 0, | |
1598 PT, height, 0, | |
1599 width, hscroll, pos_tab_offset (w, startp), w); | |
1600 /* If PT does fit on the screen, we will use this start pos, | |
1601 so do so by setting force_start. */ | |
1602 if (pos.bufpos == PT) | |
1603 w->force_start = Qt; | |
1604 } | |
1584 | 1605 |
1585 /* Handle case where place to start displaying has been specified, | 1606 /* Handle case where place to start displaying has been specified, |
1586 unless the specified location is outside the accessible range. */ | 1607 unless the specified location is outside the accessible range. */ |
1587 if (!NILP (w->force_start)) | 1608 if (!NILP (w->force_start)) |
1588 { | 1609 { |