diff --git a/config.org b/config.org index 083fca3..72a38c7 100644 --- a/config.org +++ b/config.org @@ -1311,7 +1311,7 @@ The =visual-fill-column= package works by expanding the window's right margin. T When a buffer has line numbers, they can interfere with the margins and make the line smaller than it should be. We can mitigate this issue by adding extra columns to the window. #+begin_src emacs-lisp -(defun ~/update-visual-fill-column-line-numbers (&optional _s _e _len) +(defun ~/update-visual-fill-column-line-numbers () (require 'visual-fill-column) (let ((dw (line-number-display-width))) ;; 2 extra columns for padding (when line numbers are on) @@ -1320,7 +1320,7 @@ When a buffer has line numbers, they can interfere with the margins and make the (unless (= dw (or (cdr visual-fill-column-extra-text-width) 0)) (setq-local visual-fill-column-extra-text-width (cons 0 dw)) - (visual-fill-column--adjust-window)))) + (visual-fill-column-adjust)))) (add-hook! '(display-line-numbers-mode-hook post-command-hook doom-switch-buffer-hook) #'~/update-visual-fill-column-line-numbers)