summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-01-02 10:03:20 -0600
committerCase Duckworth2021-01-02 10:03:20 -0600
commit02abd6dbf8b8d1866e769c411acbee74a9f3e0bd (patch)
tree79e8358bf97bd0fcbf796891cb7c79139d21eb0b
parentUse hippie-expand (diff)
downloademacs-02abd6dbf8b8d1866e769c411acbee74a9f3e0bd.tar.gz
emacs-02abd6dbf8b8d1866e769c411acbee74a9f3e0bd.zip
Preserve the point position on screen when scrolling
-rw-r--r--config.org16
1 files changed, 16 insertions, 0 deletions
diff --git a/config.org b/config.org index aa187c0..d7b10f9 100644 --- a/config.org +++ b/config.org
@@ -662,6 +662,22 @@ Anyway, I should probably be able to figure out how to properly change the theme
662(run-hooks 'acdw/map-defined-hook) 662(run-hooks 'acdw/map-defined-hook)
663#+END_SRC 663#+END_SRC
664 664
665** Mouse
666
667*** Preserve screen position when scrolling with the mouse wheel
668
669from [[https://www.reddit.com/r/emacs/comments/km9by4/weekly_tipstricketc_thread/ghg2c9d/][u/TheFrenchPoulp]].
670
671#+BEGIN_SRC emacs-lisp
672 (advice-add 'mwheel-scroll :around #'me/mwheel-scroll)
673
674 (defun me/mwheel-scroll (original &rest arguments)
675 "Like `mwheel-scroll' but preserve screen position.
676 See `scroll-preserve-screen-position'."
677 (let ((scroll-preserve-screen-position :always))
678 (apply original arguments)))
679#+end_src
680
665** Persistence 681** Persistence
666 682
667*** Minibuffer history 683*** Minibuffer history