emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/visual-fill-column d9d4d78914 065/137: Enable scrolling in


From: ELPA Syncer
Subject: [nongnu] elpa/visual-fill-column d9d4d78914 065/137: Enable scrolling in margins
Date: Sun, 2 Jan 2022 22:59:12 -0500 (EST)

branch: elpa/visual-fill-column
commit d9d4d7891413f6f06319466c1cc3846869b57210
Author: yuhan0 <qythium@gmail.com>
Commit: GitHub <noreply@github.com>

    Enable scrolling in margins
    
    Adds a keymap to visual-fill-column-mode to allow for mouse scrolling in 
the margins
---
 visual-fill-column.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/visual-fill-column.el b/visual-fill-column.el
index f78ce9ddf1..6a225d1d8b 100644
--- a/visual-fill-column.el
+++ b/visual-fill-column.el
@@ -69,6 +69,13 @@ this option is set to a value, it is used instead."
 (define-minor-mode visual-fill-column-mode
   "Wrap lines according to `fill-column' in `visual-line-mode'."
   :init-value nil :lighter nil :global nil
+  :keymap
+  (let ((map (make-sparse-keymap)))
+    (define-key map (vector 'left-margin mouse-wheel-down-event) 
'mwheel-scroll)
+    (define-key map (vector 'left-margin mouse-wheel-up-event) 'mwheel-scroll)
+    (define-key map (vector 'right-margin mouse-wheel-down-event) 
'mwheel-scroll)
+    (define-key map (vector 'right-margin mouse-wheel-up-event) 'mwheel-scroll)
+    map)
   (if visual-fill-column-mode
       (visual-fill-column-mode--enable)
     (visual-fill-column-mode--disable)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]