diff options
-rw-r--r-- | config.org | 16 |
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 | |||
669 | from [[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 |