From 46e1d53222ab07825235aeb9c5f21e2ad90fa545 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 6 Oct 2021 11:17:10 -0500 Subject: Fix bug and add bindings --- init.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 5217556..546a05a 100644 --- a/init.el +++ b/init.el @@ -2322,8 +2322,11 @@ the default is \"/\"." (list (propertize " " 'display - '((space :align-to - ,(unless visual-fill-column-mode 0)))) + '((space + :align-to + ,(unless + (bound-and-true-p visual-fill-column-mode) + 0)))) (funcall topsy-fn)))))) (setup (:straight trashed) @@ -2419,7 +2422,15 @@ If used with a numeric prefix argument N, N backticks will be inserted." (setq-local indicate-empty-lines nil indicate-buffer-boundaries nil) (acdw/setup-fringes)))) - (:advise text-scale-adjust :after #'visual-fill-column-adjust)) + (:advise text-scale-adjust :after #'visual-fill-column-adjust) + ;; Fix bindings + (when (bound-and-true-p mouse-wheel-mode) + (with-eval-after-load 'visual-fill-column + (dolist (margin '(right-margin left-margin)) + (dolist (event '(wheel-down wheel-up)) + (define-key visual-fill-column-mode-map + (vector margin event) + #'mwheel-scroll)))))) (setup (:straight visual-regexp) (:global "M-%" #'vr/query-replace)) -- cgit 1.4.1-21-gabe81