justbur / emacs-which-key

Emacs package that displays available keybindings in popup
GNU General Public License v3.0
1.74k stars 87 forks source link

In some situations, which-key changes the position of current buffer #320

Closed fredericgiquel closed 2 years ago

fredericgiquel commented 3 years ago

In default configuration (side window on bottom), if the point is in the last lines of the visible buffer (and which-key is appearing), the position of the buffer you are working on is lost. And it can be very frustrating when there are important informations at the top of the buffer.

Some illustrations to be more explicit.

First illustration : without which-key

Sequence of actions :

First illustration

Second illustration : with which-key

Sequence of actions :

Second illustration

Sames command that the first case but different buffer position at the end.

Third illustration : vanilla Emacs mini-buffer completion

Sequence of actions :

Third illustration

The buffer position is changed when the completion window appears (like with which-key). But at the end, the position is restored.

In my opinion, which-key should act the same way and restore the initial buffer position. I'm going to open a PR with a possible solution.

fredericgiquel commented 2 years ago

https://github.com/justbur/emacs-which-key/pull/321 is merged.

IMHO, this issue can be closed.