* 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)
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)