Skip to content

Commit

Permalink
[defaults] Improve scrolling with mouse wheel
Browse files Browse the repository at this point in the history
Thanks to Profpatsch.

Fixes #1781
  • Loading branch information
syl20bnr committed Mar 24, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3d1b886 commit 5ca9956
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions layers/+spacemacs/spacemacs-defaults/config.el
Original file line number Diff line number Diff line change
@@ -48,9 +48,6 @@ It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
;; (tabulated-list-print t)
(tabulated-list-print))

;; Mouse cursor in terminal mode
(xterm-mouse-mode 1)

;; Highlight and allow to open http link at point in programming buffers
;; goto-address-prog-mode only highlights links in strings and comments
(add-hook 'prog-mode-hook 'goto-address-prog-mode)
@@ -66,6 +63,21 @@ It runs `tabulated-list-revert-hook', then calls `tabulated-list-print'."
;; Don't try to ping things that look like domain names
(setq ffap-machine-p-known 'reject)

;; ---------------------------------------------------------------------------
;; Mouse
;; ---------------------------------------------------------------------------

;; Mouse cursor in terminal mode
(xterm-mouse-mode 1)

(when (boundp 'mouse-wheel-scroll-amount)
;; scroll one line at a time (less "jumpy" than defaults)
(setq mouse-wheel-scroll-amount '(1)
;; don't accelerate scrolling
mouse-wheel-progressive-speed nil
;; scroll window under mouse
mouse-wheel-follow-mouse 't))

;; ---------------------------------------------------------------------------
;; Edit
;; ---------------------------------------------------------------------------

0 comments on commit 5ca9956

Please sign in to comment.