diff options
author | Shynur <one.last.kiss@outlook.com> | 2023-03-30 01:29:17 +0800 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2023-03-30 09:43:00 +0300 |
commit | 10918fc9d249fb829a363a4b73847289b8f2bce9 (patch) | |
tree | 1ea2cfbdf1bebc81dfc35092be43c54b46b0fa93 /src | |
parent | 9b32bc134c4b4d8928df1bdc39907d9b1d6c73b5 (diff) | |
download | emacs-10918fc9d249fb829a363a4b73847289b8f2bce9.tar.gz |
Fix scrolling window when point moves up
This fixes the case when both 'scroll-conservatively' and
'scroll-step' are customized to non-default values.
* src/xdisp.c (try_scrolling): Fix precedence between
'scroll-step' and 'scroll-conservatively' when scrolling with
'previous-line'. (Bug#62530)
Copyright-paperwork-exempt: yes
Diffstat (limited to 'src')
-rw-r--r-- | src/xdisp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 0b190529404..8e265fb5a49 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18546,8 +18546,9 @@ try_scrolling (Lisp_Object window, bool just_this_one_p, start_display (&it, w, startp); if (arg_scroll_conservatively) - amount_to_scroll = max (dy, frame_line_height - * max (scroll_step, temp_scroll_step)); + amount_to_scroll + = min (max (dy, frame_line_height), + frame_line_height * arg_scroll_conservatively); else if (scroll_step || temp_scroll_step) amount_to_scroll = scroll_max; else |