[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 0c78822: Fix subtle problem with scroll-down when
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 0c78822: Fix subtle problem with scroll-down when scroll-margin is nonzero |
Date: |
Fri, 29 Dec 2017 16:42:40 -0500 (EST) |
branch: emacs-26
commit 0c78822c701533a94b010a043bcb049dd594bb93
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix subtle problem with scroll-down when scroll-margin is nonzero
* src/window.c (window_scroll_pixel_based): Account for
scroll-margin when scrolling down, i.e. moving window-start
towards the beginning of the buffer. Reported by zhang cc
<address@hidden> in
http://lists.gnu.org/archive/html/emacs-devel/2017-12/msg00894.html.
---
src/window.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/window.c b/src/window.c
index 504dcd3..20a6020 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5397,12 +5397,13 @@ window_scroll_pixel_based (Lisp_Object window, int n,
bool whole, bool noerror)
if (it.what == IT_EOB)
partial_p =
it.current_y + it.ascent + it.descent
- > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w);
+ > it.last_visible_y - this_scroll_margin - WINDOW_HEADER_LINE_HEIGHT
(w);
else
{
move_it_by_lines (&it, 1);
partial_p =
- it.current_y > it.last_visible_y - WINDOW_HEADER_LINE_HEIGHT (w);
+ it.current_y
+ > it.last_visible_y - this_scroll_margin -
WINDOW_HEADER_LINE_HEIGHT (w);
}
if (charpos == PT && !partial_p
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 0c78822: Fix subtle problem with scroll-down when scroll-margin is nonzero,
Eli Zaretskii <=