aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1996-02-21 21:09:52 +0000
committerKarl Heuer1996-02-21 21:09:52 +0000
commit3dcd07e339a53b32ad61e6c7ac8c25b020c7d795 (patch)
treee67a6cb7a8ad63ef54c5c0f8a718fd953118fa92 /src
parent6ed6233b68b5d0d9b896a99383d00f3e78c54fad (diff)
downloademacs-3dcd07e339a53b32ad61e6c7ac8c25b020c7d795.tar.gz
emacs-3dcd07e339a53b32ad61e6c7ac8c25b020c7d795.zip
(redisplay_window): If window-scroll-functions change
the start position, redisplay from the new one.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 3430c98d211..7fc3425dc0d 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1546,8 +1546,11 @@ redisplay_window (window, just_this_one)
1546 update_mode_line = 1; 1546 update_mode_line = 1;
1547 w->update_mode_line = Qt; 1547 w->update_mode_line = Qt;
1548 if (! NILP (Vwindow_scroll_functions)) 1548 if (! NILP (Vwindow_scroll_functions))
1549 run_hook_with_args_2 (Qwindow_scroll_functions, window, 1549 {
1550 make_number (startp)); 1550 run_hook_with_args_2 (Qwindow_scroll_functions, window,
1551 make_number (startp));
1552 startp = marker_position (w->start);
1553 }
1551 } 1554 }
1552 XSETFASTINT (w->last_modified, 0); 1555 XSETFASTINT (w->last_modified, 0);
1553 if (startp < BEGV) startp = BEGV; 1556 if (startp < BEGV) startp = BEGV;
@@ -1722,8 +1725,11 @@ redisplay_window (window, just_this_one)
1722 if (PT >= pos.bufpos) 1725 if (PT >= pos.bufpos)
1723 { 1726 {
1724 if (! NILP (Vwindow_scroll_functions)) 1727 if (! NILP (Vwindow_scroll_functions))
1725 run_hook_with_args_2 (Qwindow_scroll_functions, window, 1728 {
1726 make_number (pos.bufpos)); 1729 run_hook_with_args_2 (Qwindow_scroll_functions, window,
1730 make_number (pos.bufpos));
1731 pos.bufpos = marker_position (w->start);
1732 }
1727 try_window (window, pos.bufpos); 1733 try_window (window, pos.bufpos);
1728 if (cursor_vpos >= 0) 1734 if (cursor_vpos >= 0)
1729 { 1735 {
@@ -1750,8 +1756,11 @@ recenter:
1750 in case the window-scroll-functions functions get errors. */ 1756 in case the window-scroll-functions functions get errors. */
1751 Fset_marker (w->start, make_number (pos.bufpos), Qnil); 1757 Fset_marker (w->start, make_number (pos.bufpos), Qnil);
1752 if (! NILP (Vwindow_scroll_functions)) 1758 if (! NILP (Vwindow_scroll_functions))
1753 run_hook_with_args_2 (Qwindow_scroll_functions, window, 1759 {
1754 make_number (pos.bufpos)); 1760 run_hook_with_args_2 (Qwindow_scroll_functions, window,
1761 make_number (pos.bufpos));
1762 pos.bufpos = marker_position (w->start);
1763 }
1755 try_window (window, pos.bufpos); 1764 try_window (window, pos.bufpos);
1756 1765
1757 startp = marker_position (w->start); 1766 startp = marker_position (w->start);