[defaults] Show scroll bar when using the mouse wheel
Thanks to duianto
This commit is contained in:
parent
01a84d9fe8
commit
811001a48c
|
@ -1438,6 +1438,23 @@ using a visual block/rectangle selection."
|
|||
(interactive)
|
||||
(spacemacs/sort-lines-by-column -1))
|
||||
|
||||
;; Show scroll bar when using the mouse wheel
|
||||
(defun spacemacs//scroll-bar-hide ()
|
||||
" Hide the scroll bar."
|
||||
(scroll-bar-mode -1))
|
||||
(defun spacemacs//scroll-bar-show-delayed-hide (&rest _ignore)
|
||||
"Show the scroll bar for a couple of seconds, before hiding it.
|
||||
|
||||
This can be used to temporarily show the scroll bar when mouse wheel scrolling.
|
||||
(advice-add 'mwheel-scroll :after #'spacemacs//scroll-bar-show-delayed-hide)
|
||||
|
||||
The advice can be removed with:
|
||||
(advice-remove 'mwheel-scroll #'spacemacs//scroll-bar-show-delayed-hide)"
|
||||
(scroll-bar-mode 1)
|
||||
(run-with-idle-timer 3 nil #'spacemacs//scroll-bar-hide))
|
||||
(when (fboundp 'scroll-bar-mode)
|
||||
(advice-add 'mwheel-scroll :after #'spacemacs//scroll-bar-show-delayed-hide))
|
||||
|
||||
;; BEGIN linum mouse helpers
|
||||
|
||||
(defvar spacemacs-linum-mdown-line nil
|
||||
|
|
Loading…
Reference in New Issue