1

How to enforce preserving buffer position while scrolling with mouse wheel?

Currently if I scroll for amount that buffer cursor position should be out of the screen that position is changed. And I don't want this because it is not happening in other editors like Qt Creator, IntelliJ IDEA etc.

I would like to have some mouse-wheel-scroll-preserve-buffer-position.

2 Answers 2

2

You can't. The Emacs display engine doesn't allow this. See this question

0

BTW, while the position of point has to be on screen, that doesn't prevent an Elisp package from reverting point to what it was before the mouse-wheel scroll when you stop scrolling and hit the keyboard again. So, Emacs doesn't support it right now, but it shouldn't be difficult to make it work if you really want to. Patches welcome to add such an optional behavior.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.