[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 6b351b2: Fix scrolling past tall images
From: |
Eli Zaretskii |
Subject: |
master 6b351b2: Fix scrolling past tall images |
Date: |
Mon, 8 Feb 2021 11:04:32 -0500 (EST) |
branch: master
commit 6b351b2d7608def23cc4bbd76ba8dc300708e953
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix scrolling past tall images
* src/xdisp.c (try_window): Don't try checking the margins if the
window is vscrolled, as that could cause unnecessary recentering
when tall images are displayed. (Bug#46320)
---
src/xdisp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/xdisp.c b/src/xdisp.c
index 1815f98..fb8eaf4 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -19452,8 +19452,11 @@ try_window (Lisp_Object window, struct text_pos pos,
int flags)
'start_display' again. */
ptrdiff_t it_charpos = IT_CHARPOS (it);
- /* Don't let the cursor end in the scroll margins. */
+ /* Don't let the cursor end in the scroll margins. However, when
+ the window is vscrolled, we leave it to vscroll to handle the
+ margins, see window_scroll_pixel_based. */
if ((flags & TRY_WINDOW_CHECK_MARGINS)
+ && w->vscroll == 0
&& !MINI_WINDOW_P (w))
{
int top_scroll_margin = window_scroll_margin (w, MARGIN_IN_PIXELS);
@@ -19462,7 +19465,7 @@ try_window (Lisp_Object window, struct text_pos pos,
int flags)
top_scroll_margin += CURRENT_HEADER_LINE_HEIGHT (w);
start_display (&it, w, pos);
- if ((w->cursor.y >= 0 /* not vscrolled */
+ if ((w->cursor.y >= 0
&& w->cursor.y < top_scroll_margin
&& CHARPOS (pos) > BEGV)
/* rms: considering make_cursor_line_fully_visible_p here
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 6b351b2: Fix scrolling past tall images,
Eli Zaretskii <=