fix: dynamically adjust line wrap to line number width
This commit is contained in:
parent
b110f19584
commit
8a74b84b35
1 changed files with 7 additions and 3 deletions
10
config.org
10
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue