aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-11-10 00:25:30 +0000
committerRichard M. Stallman1996-11-10 00:25:30 +0000
commitcf0df6ab1bfd10e29b9eee2a3c1f293f1b81a892 (patch)
tree07d4eb9b039078881dc6174a8421f14043e32e01 /src
parentfbf44f72c8a62da4268d7ed060fe809686bc9b7a (diff)
downloademacs-cf0df6ab1bfd10e29b9eee2a3c1f293f1b81a892.tar.gz
emacs-cf0df6ab1bfd10e29b9eee2a3c1f293f1b81a892.zip
(redisplay_window): Handle optional_new_start.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 5787a2e6668..7151877a6f8 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1582,6 +1582,27 @@ redisplay_window (window, just_this_one, preserve_echo_area)
1582 1582
1583 startp = marker_position (w->start); 1583 startp = marker_position (w->start);
1584 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 }
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))