Move the scrolling code to the scrolling section
This commit is contained in:
21
init.el
21
init.el
@@ -242,13 +242,6 @@
|
|||||||
;; window.
|
;; window.
|
||||||
(setq scroll-preserve-screen-position t)
|
(setq scroll-preserve-screen-position t)
|
||||||
|
|
||||||
;;; Mouse
|
|
||||||
|
|
||||||
;; Emacs 29
|
|
||||||
(when (memq 'context-menu minimal-emacs-ui-features)
|
|
||||||
(when (and (display-graphic-p) (fboundp 'context-menu-mode))
|
|
||||||
(add-hook 'after-init-hook #'context-menu-mode)))
|
|
||||||
|
|
||||||
(setq hscroll-margin 2
|
(setq hscroll-margin 2
|
||||||
hscroll-step 1
|
hscroll-step 1
|
||||||
;; Emacs spends excessive time recentering the screen when the cursor
|
;; Emacs spends excessive time recentering the screen when the cursor
|
||||||
@@ -261,16 +254,22 @@
|
|||||||
;; significantly off-screen.
|
;; significantly off-screen.
|
||||||
scroll-conservatively 10
|
scroll-conservatively 10
|
||||||
scroll-margin 0
|
scroll-margin 0
|
||||||
scroll-preserve-screen-position t
|
|
||||||
;; Reduce cursor lag by preventing automatic adjustments to
|
;; Reduce cursor lag by preventing automatic adjustments to
|
||||||
;; `window-vscroll' for unusually long lines. Setting
|
;; `window-vscroll' for unusually long lines. Setting
|
||||||
;; `auto-window-vscroll' it to nil also resolves the issue of random
|
;; `auto-window-vscroll' it to nil also resolves the issue of random
|
||||||
;; half-screen jumps during scrolling.
|
;; half-screen jumps during scrolling.
|
||||||
auto-window-vscroll nil
|
auto-window-vscroll nil)
|
||||||
;; Mouse
|
|
||||||
mouse-wheel-scroll-amount '(1 ((shift) . hscroll))
|
;;; Mouse Scroll
|
||||||
|
|
||||||
|
(setq mouse-wheel-scroll-amount '(1 ((shift) . hscroll))
|
||||||
mouse-wheel-scroll-amount-horizontal 1)
|
mouse-wheel-scroll-amount-horizontal 1)
|
||||||
|
|
||||||
|
;; Emacs 29
|
||||||
|
(when (memq 'context-menu minimal-emacs-ui-features)
|
||||||
|
(when (and (display-graphic-p) (fboundp 'context-menu-mode))
|
||||||
|
(add-hook 'after-init-hook #'context-menu-mode)))
|
||||||
|
|
||||||
;;; Cursor
|
;;; Cursor
|
||||||
;; The blinking cursor is distracting and interferes with cursor settings in
|
;; The blinking cursor is distracting and interferes with cursor settings in
|
||||||
;; some minor modes that try to change it buffer-locally (e.g., Treemacs).
|
;; some minor modes that try to change it buffer-locally (e.g., Treemacs).
|
||||||
|
|||||||
Reference in New Issue
Block a user