diff options
| author | Karl Heuer | 1995-01-10 00:06:50 +0000 |
|---|---|---|
| committer | Karl Heuer | 1995-01-10 00:06:50 +0000 |
| commit | 2f787aa33c86aba7e1254264ae87e31efa90472e (patch) | |
| tree | 42af86be3676b062dff36f0f9b700c9685d2b9d4 | |
| parent | 5023d9a0082fe05cd0fa74cb087934f5c8fde5b8 (diff) | |
| download | emacs-2f787aa33c86aba7e1254264ae87e31efa90472e.tar.gz emacs-2f787aa33c86aba7e1254264ae87e31efa90472e.zip | |
(Fscroll_other_window): On small windows, scroll by 1 line.
| -rw-r--r-- | src/window.c | 9 |
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)) |