From 8a74b84b35a317ab322d27a11d4ff0267a1c2cfe Mon Sep 17 00:00:00 2001 From: Kiana Sheibani Date: Thu, 3 Apr 2025 06:18:02 -0400 Subject: [PATCH] fix: dynamically adjust line wrap to line number width --- config.org | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/config.org b/config.org index be01a14..ef1cdbc 100644 --- a/config.org +++ b/config.org @@ -1467,9 +1467,13 @@ When a buffer has line numbers, they can interfere with the margins and make the #+begin_src emacs-lisp (add-hook! display-line-numbers-mode (require 'visual-fill-column) - (when visual-fill-column-mode - (setq-local visual-fill-column-extra-text-width '(0 . 6)) - (visual-fill-column--adjust-window))) + (setq-local + visual-fill-column-extra-text-width + (cons 0 (if display-line-numbers-mode + ;; Width of line number + 2 padding columns + (+ 2 (line-number-display-width)) + 0))) + (visual-fill-column--adjust-window)) #+end_src ** Dashboard