[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master d1da8e5: Avoid infloop when scrolling under scroll-
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master d1da8e5: Avoid infloop when scrolling under scroll-preserve-screen-position |
Date: |
Sat, 9 Sep 2017 10:22:08 -0400 (EDT) |
branch: master
commit d1da8e534db54bb82b6f2b16bba86a6d202ac675
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid infloop when scrolling under scroll-preserve-screen-position
* src/window.c (window_scroll_pixel_based): If screen position is
to be preserved, make sure its recorded Y coordinate is outside
the scroll margin. (Bug#28342)
---
src/window.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/window.c b/src/window.c
index 8578705..18adb62 100644
--- a/src/window.c
+++ b/src/window.c
@@ -5335,6 +5335,11 @@ window_scroll_pixel_based (Lisp_Object window, int n,
bool whole, bool noerror)
break;
}
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
+ /* Fix up the Y position to preserve, if it is inside the
+ scroll margin at the window top. */
+ if (window_scroll_pixel_based_preserve_y >= 0
+ && window_scroll_pixel_based_preserve_y < this_scroll_margin)
+ window_scroll_pixel_based_preserve_y = this_scroll_margin;
}
}
else if (n < 0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master d1da8e5: Avoid infloop when scrolling under scroll-preserve-screen-position,
Eli Zaretskii <=