aboutsummaryrefslogtreecommitdiffstats
path: root/src/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/window.c b/src/window.c
index 2014e043bae..bb306dd4b8e 100644
--- a/src/window.c
+++ b/src/window.c
@@ -2580,14 +2580,15 @@ showing that buffer, popping the buffer up if necessary.")
2580 register Lisp_Object n; 2580 register Lisp_Object n;
2581{ 2581{
2582 register Lisp_Object window; 2582 register Lisp_Object window;
2583 register int ht; 2583 register int defalt;
2584 register struct window *w; 2584 register struct window *w;
2585 register int count = specpdl_ptr - specpdl; 2585 register int count = specpdl_ptr - specpdl;
2586 2586
2587 window = Fother_window_for_scrolling (); 2587 window = Fother_window_for_scrolling ();
2588 2588
2589 w = XWINDOW (window); 2589 w = XWINDOW (window);
2590 ht = window_internal_height (w); 2590 defalt = window_internal_height (w) - next_screen_context_lines;
2591 if (defalt < 1) defalt = 1;
2591 2592
2592 /* Don't screw up if window_scroll gets an error. */ 2593 /* Don't screw up if window_scroll gets an error. */
2593 record_unwind_protect (save_excursion_restore, save_excursion_save ()); 2594 record_unwind_protect (save_excursion_restore, save_excursion_save ());
@@ -2596,9 +2597,9 @@ showing that buffer, popping the buffer up if necessary.")
2596 SET_PT (marker_position (w->pointm)); 2597 SET_PT (marker_position (w->pointm));
2597 2598
2598 if (NILP (n)) 2599 if (NILP (n))
2599 window_scroll (window, ht - next_screen_context_lines, 1); 2600 window_scroll (window, defalt, 1);
2600 else if (EQ (n, Qminus)) 2601 else if (EQ (n, Qminus))
2601 window_scroll (window, next_screen_context_lines - ht, 1); 2602 window_scroll (window, -defalt, 1);
2602 else 2603 else
2603 { 2604 {
2604 if (CONSP (n)) 2605 if (CONSP (n))