New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore window position after using swiper. #643

merged 1 commit into from Aug 30, 2016


None yet
1 participant

ghost commented Aug 30, 2016

After exiting swiper, re-search-forward is used to go to the match, and when some variables like scroll-conservatively are set to high values, this causes a 'jumping' behavior where the cursor was somewhere near the middle and now is near the bottom or top of the screen.

This patch saves the window start position and restores it.

This should fix #642 .

Stephen Whipple
Restore window position after using swiper.
This prevents a "jumping" behavior which occurs when variables
such as `scroll-conservatively' are set to a high value.

* swiper.el (swiper--current-match-start): Hold the window-start
position for restoration.
(swiper--action): If `swiper-action-recenter' is nil, then restore
the window-start that was used during selection.

@abo-abo abo-abo merged commit 4c3ecb4 into abo-abo:master Aug 30, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


abo-abo commented Aug 30, 2016


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment