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.

V_V
  • 612
  • 9
  • 23

2 Answers2

2

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

Community
  • 1
  • 1
event_jr
  • 17,467
  • 4
  • 47
  • 62
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.

Stefan
  • 27,908
  • 4
  • 53
  • 82