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

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

[nongnu] elpa/visual-fill-column c8d61f0287 070/137: Take line number wi


From: ELPA Syncer
Subject: [nongnu] elpa/visual-fill-column c8d61f0287 070/137: Take line number width into account.
Date: Sun, 2 Jan 2022 22:59:12 -0500 (EST)

branch: elpa/visual-fill-column
commit c8d61f0287636a23b01fdc6e120cfeb9eb460107
Author: Joost Kremers <joostkremers@fastmail.fm>
Commit: Joost Kremers <joostkremers@fastmail.fm>

    Take line number width into account.
---
 visual-fill-column.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/visual-fill-column.el b/visual-fill-column.el
index 11f074902c..70d4e790e6 100644
--- a/visual-fill-column.el
+++ b/visual-fill-column.el
@@ -189,7 +189,11 @@ and `text-scale-mode-step'."
                   1.0)))
     (truncate (/ (+ (window-width window)
                     (or (car margins) 0)
-                    (or (cdr margins) 0))
+                    (or (cdr margins) 0)
+                    (or (and (boundp 'display-line-numbers-width)
+                             (numberp display-line-numbers-width)
+                             (- display-line-numbers-width))
+                        0))
                  (float scale)))))
 
 (defun visual-fill-column--set-margins ()



reply via email to

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