Commit d1da8e53 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

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)
parent af11532b
......@@ -5335,6 +5335,11 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
/* 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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment