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

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

[elpa] externals/olivetti 050815f 113/134: Use internal rounding for oli


From: Stefan Monnier
Subject: [elpa] externals/olivetti 050815f 113/134: Use internal rounding for olivetti-safe-width
Date: Thu, 25 Apr 2019 09:57:39 -0400 (EDT)

branch: externals/olivetti
commit 050815f4ba891d7a1680a30e48563ba860229395
Author: Paul Rankin <address@hidden>
Commit: Paul Rankin <address@hidden>

    Use internal rounding for olivetti-safe-width
---
 olivetti.el | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/olivetti.el b/olivetti.el
index eb1f6d8..38163ef 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -283,8 +283,10 @@ face, scale N by that factor, otherwise scale by 1."
            1)))
 
 (defun olivetti-safe-width (width window)
-  "Parse WIDTH to a safe value for `olivetti-body-width' for WINDOW."
-  (let ((window-width (window-total-width window 'floor))
+  "Parse WIDTH to a safe value for `olivetti-body-width' for WINDOW.
+
+May return a float with many digits of precision."
+  (let ((window-width (window-total-width window))
         (fringes (window-fringes window))
         (min-width (+ olivetti-minimum-body-width
                       (% olivetti-minimum-body-width 2))))



reply via email to

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