Mercurial > emacs
changeset 14614:8fda783ead43
(redisplay_window): If window-scroll-functions change
the start position, redisplay from the new one.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 21 Feb 1996 21:09:52 +0000 |
parents | 386831bc4a4e |
children | 1bbe2716bcea |
files | src/xdisp.c |
diffstat | 1 files changed, 15 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Wed Feb 21 21:08:31 1996 +0000 +++ b/src/xdisp.c Wed Feb 21 21:09:52 1996 +0000 @@ -1546,8 +1546,11 @@ update_mode_line = 1; w->update_mode_line = Qt; if (! NILP (Vwindow_scroll_functions)) - run_hook_with_args_2 (Qwindow_scroll_functions, window, - make_number (startp)); + { + run_hook_with_args_2 (Qwindow_scroll_functions, window, + make_number (startp)); + startp = marker_position (w->start); + } } XSETFASTINT (w->last_modified, 0); if (startp < BEGV) startp = BEGV; @@ -1722,8 +1725,11 @@ if (PT >= pos.bufpos) { if (! NILP (Vwindow_scroll_functions)) - run_hook_with_args_2 (Qwindow_scroll_functions, window, - make_number (pos.bufpos)); + { + run_hook_with_args_2 (Qwindow_scroll_functions, window, + make_number (pos.bufpos)); + pos.bufpos = marker_position (w->start); + } try_window (window, pos.bufpos); if (cursor_vpos >= 0) { @@ -1750,8 +1756,11 @@ in case the window-scroll-functions functions get errors. */ Fset_marker (w->start, make_number (pos.bufpos), Qnil); if (! NILP (Vwindow_scroll_functions)) - run_hook_with_args_2 (Qwindow_scroll_functions, window, - make_number (pos.bufpos)); + { + run_hook_with_args_2 (Qwindow_scroll_functions, window, + make_number (pos.bufpos)); + pos.bufpos = marker_position (w->start); + } try_window (window, pos.bufpos); startp = marker_position (w->start);