1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 15:30:29 -08:00
Commit graph

2 commits

Author SHA1 Message Date
Noam Postavsky
f0e7f39e0b Fix scrolling with partial line corner case (Bug#25792)
Also fix up the scrolling tests so that they don't make so many
assumptions about the current window configuration.

* src/xdisp.c (try_window): Take partial line height into account when
comparing cursor position against scroll margin.

* test/manual/scroll-tests.el (scroll-tests-with-buffer-window): Add
HEIGHT argument, to allow setting up window with exact height and
partial line.
(scroll-tests-display-buffer-with-height): New display-buffer action
function.
(scroll-tests-scroll-margin-over-max):
(scroll-tests--scroll-margin-whole-window): Pass HEIGHT to
`scroll-tests--scroll-margin-whole-window'.
(scroll-tests-conservative-show-trailing-whitespace): New test.
(scroll-tests-scroll-margin-negative): Fix line counting.
(scroll-tests--point-in-middle-of-window-p): Set window height
properly.
2017-02-24 23:15:40 -05:00
Noam Postavsky
da515a0d8e Add tests for scrolling
* test/manual/scroll-tests.el: New tests for scroll-margin behavior.
2017-02-02 21:21:18 -05:00