branch: externals/olivetti
commit 050815f4ba891d7a1680a30e48563ba860229395
Author: Paul Rankin <[email protected]>
Commit: Paul Rankin <[email protected]>
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))))