Currently, if displaying the popup would hide point, the window is scrolled to prevent this; but it is not scrolled back when the popup closes. This can be disorienting when the popup is tall, as the scroll changes by a large amount.
The solution is to store the scroll position of the selected window before showing the popup, and restore it after closing it.
https://github.com/justbur/emacs-which-key/pull/321 added an option to do the same thing, but only for the side-window popup type, and using set-window-configuration which is dangerous as discussed there. This solution should work for any popup function.
I didn't remove/deprecate the option introduced in #321, as users may have come to rely on side-effects from set-window-configuration (but mostly because it would put me over 15 lines 🙂).
Currently, if displaying the popup would hide point, the window is scrolled to prevent this; but it is not scrolled back when the popup closes. This can be disorienting when the popup is tall, as the scroll changes by a large amount.
The solution is to store the scroll position of the selected window before showing the popup, and restore it after closing it.
https://github.com/justbur/emacs-which-key/pull/321 added an option to do the same thing, but only for the
side-window
popup type, and usingset-window-configuration
which is dangerous as discussed there. This solution should work for any popup function.I didn't remove/deprecate the option introduced in #321, as users may have come to rely on side-effects from
set-window-configuration
(but mostly because it would put me over 15 lines 🙂).